# Find all $x$ so $\frac{1^2+2^2+\cdots+x^2}{x}$ is a perfect square…

Find all $x$ so $\dfrac{1^2+2^2+\cdots+x^2}{x}$ is a perfect square...

Clearly 1 is solution, but I have to show that there is an infinity... I see that this happens when the numbers $1,2,...,x$ have a whole quadratic root. Am I on the right road?

The main result is:

$$1^2+2^2+3^2+\dots + x^2=\frac{x(x+1)(2x+1)}{6}$$

So you need $\frac{(x+1)(2x+1)}{6}=y^2$ for some $y$.

Or:

$$2x^2+3x+1 = 6y^2$$

From here, we are essentially going to "complete the square" on the left side.

Multiply both sides by $8$ and you get:

$$16x^2+24x+8=(4x+3)^2-1=48y^2$$

So you need infinitely many solutions to:

$$(4x+3)^2-48y^2=1$$

So you need to know how to solve Pell's equations from here.

The generally positive solution to the equation $u^2-48y^2=1$ can be written as:

$$u+y\sqrt{48}=(7+\sqrt{48})^k$$

For any positive integer $k$.

You should be able to prove with induction that infinitely many $u$ have $u\equiv 3\pmod 4$.

The recursive sequence of values of $u$ is $u_0=1,u_1=7$ and $u_{n+1}=14u_n-u_{n-1}$. You can show that $u_k\equiv 3\pmod 4$ when $k$ is odd. The next answers after $x=1$ are $x=337$ and $x=65521$.

• But the OP has squares, whereas you have cubes... Is it a consequence of a later edit? – b00n heT Sep 12 '16 at 14:36
• @b00nheT Where do I have cubes? – Thomas Andrews Sep 12 '16 at 14:38
• $"\frac{(x+1)(2x+1)}{6}=y^2$" Isn't there missing a $x$ in the beginning? – user366454 Sep 12 '16 at 14:39
• Oh gosh. It's only a typo on the third summand. It should be $3^2$. For some reason I thought you were summing cubes all the way. – b00n heT Sep 12 '16 at 14:39
• Yeah. My fault! Sorry. Great answer btw! – b00n heT Sep 12 '16 at 14:41