What is the smallest integer $n>1$ for which the mean of the square numbers $1^2,2^2 \dots,n^2 $ is a perfect square? 
What is the smallest integer $n>1$ for which the mean of the square numbers $1^2,2^2 \dots,n^2 $ is a perfect square?

Initially, this seemed like one could work it out with $AM-GM$, but it doesn't seem so.
From $AM-GM$ one gets that $$\frac{1^2+2^2+ \dots+n^2}{n} \geqslant \sqrt[\leftroot{-1}\uproot{2}n]{1^2\cdot2^2\dots\cdot n^2}
$$
is this of any help here?
Remark.  Thanks to Favst, the source of the problem is Problem 1 of 1994 British Mathematical Olympiad Round 2

This question has already been posted on this website. See my solution via Pell's equation here, where I wrote that the answer is $337.$ The problem appeared on the 1994 British Mathematical Olympiad Round 2
Edit: as suggested by Batominovski, I am copying my old solution here:
A while ago, I found this problem as the 1994 British Mathematical Olympiad - Round 2, Problem 1, but the solution is mine. Here it is.
The equation is $$m^2=\frac{1}{n}\sum_{k=1}^{n}{k^2}=\frac{1}{n}\cdot \frac{n(n+1)(2n+1)}{6}=\frac{(n+1)(2n+1)}{6}.$$
With some manipulation, this is equivalent to $$(4n+3)^2-48m^2=1,$$ which can be solved by Pell's equation. The fundamental solution for $D=48$ in Pell's equation $x^2-Dy^2=1$ is $(x,y)=(7,1),$ so all solutions are parameterized by $$x_t + y_t \sqrt{48}=(7+\sqrt{48})^t.$$ We want to find the first solution $t>1$ for which $x_t\equiv 3\pmod{4}.$ While $t=2$ does not work, $t=3$ yields $$1351+195\sqrt{48}.$$ Since $1351=337\cdot 4+3,$ the answer is $337.$
We can check that $$\frac{(337+1)(2\cdot 337+1)}{6}=3^2\cdot 5^2\cdot 13^2.$$
