## Problem 3

What is the smallest $\mathrm{n}>1$ for which the average of the first $\mathrm{n}$ (non-zero) squares is a square?


## Solution

Answer: 337.

We need $1 / 6(n+1)(2 n+1)$ a square. We need $n=6 m+1$ for it to be an integer. So $(3 m+1)(4 m+1)$ must be a square. But $3 m+1$ and $4 m+1$ are relatively prime, so each must be a square. Suppose $3 m+1=a^{2}$ and $4 m+1=$ $(a+k)^{2}$, then (subtracting) $m=2 a k+k^{2}$, so $a^{2}-6 a k-\left(3 k^{2}+1\right)=0$, so $a=3 k+\sqrt{ }\left(12 k^{2}+1\right)$. By inspection the smallest solution of this is $\mathrm{k}=2$, giving $\mathrm{a}=13$ and hence $\mathrm{m}=56$ and $\mathrm{n}=337$.

