Maths Olympiad Prep

Track / Stage 5 / 81 of 400 #681 of 1964

Problem 681

AIME late
Algebra Difficulty 5.1 Prove it Taiwan IMO Selection Camp · Taiwan

Find all positive integers nn for which there exists some integer mm such that
1nk=mm+n1k2 \frac{1}{n} \sum_{k=m}^{m+n-1} k^2
is also a perfect square. For example, when n=7n=7, one can take m=3m=-3.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Computing and completing the square, we find
1nk=mm+n1k2=m2+(n1)m+(n1)(2n1)6=(m+n12)2+n2112 \begin{aligned} \frac{1}{n} \sum_{k=m}^{m+n-1} k^2 &= m^2 + (n-1)m + \frac{(n-1)(2n-1)}{6} \\ &= \left(m + \frac{n-1}{2}\right)^2 + \frac{n^2-1}{12} \end{aligned}
is a perfect square.

Since n21n^2 - 1 modulo 8 is either 0 or odd, n2112\frac{n^2-1}{12} must be even. Also, from the above equation we know that n2112\frac{n^2-1}{12} is the difference of two perfect squares, and since it is even, it must therefore be a multiple of 4. Hence we obtain n21(mod48)n^2 \equiv 1 \pmod{48}, so nn can only be of the form 24p±1,24p±724p \pm 1, 24p \pm 7.

Conversely, if nn is a positive integer of the form 24p±1,24p±724p \pm 1, 24p \pm 7, then n21(mod48)n^2 \equiv 1 \pmod{48}. There exists a nonnegative integer aa such that n2112=4a\frac{n^2-1}{12} = 4a. Take m=a1n12m = a - 1 - \frac{n-1}{2}, then
1nk=mm+n1k2=(m+n12)2+n2112=(a1)2+4a=(a+1)2. \begin{aligned} \frac{1}{n} \sum_{k=m}^{m+n-1} k^2 &= \left(m + \frac{n-1}{2}\right)^2 + \frac{n^2-1}{12} \\ &= (a-1)^2 + 4a \\ &= (a+1)^2. \end{aligned}

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from zh; metadata (topic, difficulty, ordering) added by this project.