Let be a positive integer, and consider a sequence of positive integers. Extend it periodically to an infinite sequence by defining for all . If and for then for what is the strongest upperbound on the sum of the first numbers in the sequence (which will always work).
Note: Translated title problem into one with a numerical answer.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I will show the general the answer to be n 2 . When n = 2 0 1 3 this gives 4052169.
We will prove that a 1 + a 2 + . . . + a n ≤ n 2 by contradiction. First of all, if a 1 + a 2 + . . . + a n > n 2 then one of the n terms must be greater than n . Let a k be the first term which satisfies this property. We will show that k > 1 . Using the fact that a 1 ≤ a 2 ≤ . . . ≤ a n , n = n + 1 − 1 ≥ a a 1 ≥ a 1 . If a 1 = n then a n = a a 1 ≤ n and because a n ≥ a 1 , a n = n . Since a 1 ≤ a i ≤ a n for all i , we must have that a i = n . Thus a 1 + a 2 + . . . + a n = n 2 , a contradiction. This means that a 1 < n so k > 1 .
Now by the definition of k , a 1 , a 2 , . . . , a k − 1 ≤ n and a k , a k + 1 , . . . , a n ≥ a k ≥ n + 1 . Since a a 1 ≤ n + 1 − 1 = n , we know that a 1 must have a remainder of at most k − 1 when divided by n . a 1 ≤ n so we can go further and state that a 1 is at most k − 1 . Now let a i be the first term so that a i ≥ k . Now a 1 , a 2 , . . . , a i − 1 ≤ k − 1 , k ≤ a i , a i + 1 , . . . , a k − 1 ≤ n , and n + k − 1 ≥ n + a 1 ≥ a n , a n − 1 , . . . , a k ≥ n + 1 .
Now i ≤ k since a k > n ≥ k . If i = k then our first k − 1 terms are at most k − 1 and the remaining n − k + 1 terms are at most a 1 + n ≤ n + k − 1 , giving an upper bound of ( n − ( k − 1 ) ) ( n + ( k − 1 ) ) + ( k − 1 ) 2 = n 2 on the sum of the terms. This is impossible since we assumed the sum to be greater than n 2 . Thus i < k and i > 1 since a 1 ≤ k − 1 .
First of all the first i − 1 terms are at most k − 1 and the i to k − 1 -th terms are just equal to themselves. Now the k through a i -th terms are all at most a a i ≤ n + i − 1 (the a i -th term is exactly a a i ). Next the a i + 1 through a i + 1 -th terms are at most a a i + 1 ≤ n + i . This repeats until we get that the a k − 2 + 1 through a k − 1 -th terms are at most a a k − 1 ≤ n + k − 2 . Finally, the a k − 1 + 1 through the n -th terms are at most a 1 + n ≤ n + k − 1 . Thus the sum of all n terms is at most ( i − 1 ) ( k − 1 ) + l = i ∑ l = k − 1 a l + ( a i − ( k − 1 ) ) ( n + ( i − 1 ) ) + l = i ∑ l = k − 2 ( a l + 1 − a l ) ( n + l ) + ( n − a k − 1 ) ( n + ( k − 1 ) ) Now ( a i − ( k − 1 ) ) ( n + ( i − 1 ) ) + ∑ l = i l = k − 2 ( a l + 1 − a l ) ( n + l ) + ( n − a k − 1 ) ( n + ( k − 1 ) ) telescopes into n ( n + ( k − 1 ) ) − l = i ∑ l = k − 1 a l − ( k − 1 ) ( n + ( i − 1 ) ) so we can use this substitution to reduce our original value down to ( i − 1 ) ( k − 1 ) + l = i ∑ l = k − 1 a l + n ( n + ( k − 1 ) ) − l = i ∑ l = k − 1 a l − ( k − 1 ) ( n + ( i − 1 ) ) ( i − 1 ) ( k − 1 ) + n ( n + ( k − 1 ) ) − ( k − 1 ) ( n + ( i − 1 ) ) With some expanding this can be compressed into ( i − 1 ) ( k − 1 ) + n ( n + ( k − 1 ) ) − ( k − 1 ) ( n + ( i − 1 ) ) = ( i − 1 ) ( k − 1 ) + n 2 + n ( k − 1 ) − ( k − 1 ) n − ( k − 1 ) ( i − 1 ) = n 2 Thus the sum of all of the terms is at most n 2 , a contradiction. This completes our proof so a 1 + a 2 + . . . + a n ≤ n 2 . Q.E.D.