Let be a sequence of integers, with the property that every consecutive group of 's averages to a perfect square. More precisely, for all positive integers and , the quantity
is always the square of an integer. Prove that the sequence must be constant (all are equal to the same perfect square).
Problem 1075
Official solution
Let denote the largest exponent of dividing . The problem follows from the following proposition.
Proposition
Let be a sequence of integers and let be a prime. Suppose that every consecutive group of 's with length at most averages to a perfect square. Then is independent of .
We proceed by induction on the smallest value of as ranges (which must be even, as each of the are themselves a square). First we prove two claims.
Claim - If then .
Proof. Taking groups of length in our given, we find that and for any . So and the conclusion follows.
Claim - If some is divisible by then all of them are.
Proof. The case is trivial so assume . Without loss of generality (via shifting indices) assume that , and define
Call an integer with a pivot if is a quadratic nonresidue modulo .
We claim that for any pivot . If not, then
are both qudaratic residues. Division implies that is a quadratic residue, contradiction.
Next we claim that there is an integer with , which implies . If 2 is a pivot, then we simply take . Otherwise, there are pivots, one for each nonresidue (which includes neither 0 nor 1 ), and all pivots lie in , so we can find an such that and are both pivots.
Repeating this procedure starting with shows that must all be divisible by . Combined with the first claim and the fact that , we find that all the are divisible by .
The second claim establishes the base case of our induction. Now assume all are divisible by and hence . Then all the averages in our proposition (with length at most ) are divisible by and hence . Thus the map gives a new sequence satisfying the proposition, and our inductive hypothesis completes the proof.
Remark. There is a subtle bug that arises if one omits the condition that in the proposition. When the average is not necessarily divisible by even if all the are. Hence it is not valid to divide through by . This is why the condition was added.