How can I find integers $n \gt 1$ such that the average of $1^2,2^2,3^2...n^2$ is itself a perfect square. 
$\sum_{i=1}^n i^2=\frac{n(n+1)(2n+1)}{6}$

so we would like to solve 

$6k^2=(n+1)(2n+1)$

here we see that $6|(n+1)(2n+1)\implies 2|n+1$
hence we can set $n=2j-1$
$2j(4j-1)=6k^2\implies j(4j-1)=3k^2$
how can  i find $j$ ,beside trial-and-error
$n=1$ is trivial
 A: This is not a complete answer, but it leads to one.  You would presumably convert the equation $j(4j-1) = 3k^2$ into a Pell equation by multiplying both sides by $16$ and obtaining $(8j-1)^2 - 3(4k)^2 = 1$.  The actual minimum such value of $n$ is $337$.
A: We are looking for $n,k\in\mathbb{N}$ such that $k^2=\frac{1}{n}\sum^n_{i=1}i^2=\frac{(n+1)(2n+1)}{6}$. Set $n_0=n+1$. 
The equation becomes $n_0(2n_0-1)=6k^2$. So $n_0$ is even. 
Set $n_0=2n_1$ to get $n_1(4n_1-1)=3k^2$. Now suppose $3|n_1$ and set $n_1=3n_2$. Then $n_2(12n_2-1)=k^2$. Since $n_2$ and $12n_2-1$ are coprime, both have to be squares. But $12n_2-1$ is never a square because $-1$ is not a quadratic residue modulo $4$. 
Hence we must have $3\nmid n_1$. But then $3|4n_1-1$, so $n_1\equiv 1\mod{3}$. Set $n_1=3m+1$. 
The equation is now $(3m+1)(4m+1)=k^2$. Since $3m+1$ and $4m+1$ are coprime, $3m+1=k_1^2$ and $4m+1=k_2^2$. 
Now just go through the first few squares to find some solutions. The smallest solution is $k_1=13$, $k_2=15$, $m=56$ which gives $n=337$.
A: This is an IMO Shortlist but I am having trouble remembering the source.Anyway the solution is somewhat like this 
$(n+1)(2n+1)=6m^2\implies (4n+3)^2-48m^2=1$ now it remains to solve the Pell equation. Which is trivial since we have the seed solution $(m,n)=(1,1)$ hence there are infinitely many.Now to find them explicitly http://en.wikipedia.org/wiki/Pell's_equation and remember only the solutions which are of the form $4n+3$ are elligible so we might have to remove some solutions. I will leave that up to you after generating some solutions it clearly shows 
A: Once you have something in the form $p^2-3q^2=1$ (you have $7^2-3\cdot 4^2=1$ if you work through the arithmetic, so $p=7, q=4$) you can do the following trick.
$$(p+q\sqrt 3)(p-q\sqrt 3)=1$$ now raise it to the power $n$ giving $$(p+q\sqrt 3)^n(p-q\sqrt 3)^n=1$$
So with $n=2$ you get $(p^2+3q^2+2pq\sqrt 3)(p^2+3q^2-2pq\sqrt 3)=1$ or $$(p^2+3q^2)^2-3(2pq)^2=1$$
Also if $(p,q)$ and $(r,s)$ are solutions, you get another one from $$(p+q\sqrt 3)(r+s\sqrt 3)$$ This doesn't generate any new ones if you are doing powers of a single solution - but it can give a recurrence for the coefficients of the powers, which can aid computation. It is worth checking through some of these relationships (they are also linked in to continued fractions).
A: The next solution to $$ 2 n^2 + 3 n + 1 = 6 k^2  $$ after $(n,k)$ is
$$ (97n+168k+72, 56n+97k + 42).  $$ Beginning with $(1,1)$ we see
$$ (1,1),  $$
$$ (337,195),  $$
$$ (65521,37829),  $$
$$ (12710881,7338631),  $$
$$ (2465845537, 1423656585),  $$
I wondered if anything new showed up by going backwards. This would be possible because it is not a pure Pell equation, it is adjusted with constant terms. However, nothing new:
The previous solution to $$ 2 n^2 + 3 n + 1 = 6 k^2  $$ before $(n,k)$ is
$$ (97n-168k+72, -56n+97k - 42).  $$ Beginning with $(1,1)$ we see
$$ (1,1),  $$
$$ (1,-1),  $$
$$ (337,-195),  $$
$$ (65521,-37829),  $$
$$ (12710881,-7338631),  $$
$$ (2465845537, -1423656585),  $$
