$3(1^2+2^2+...+n^2)$ is a square

122 Views Asked by At

Find all integer n such that:

$3(1^2+2^2+...+n^2)$ is a square

This also means that :

$\frac {n(n+1)(2n+1)} {2}$ is a square

3

There are 3 best solutions below

1
On BEST ANSWER

$${n(n+1)(2n+1)\over2}=m^2$$ $$2m^2=n(n+1)(2n+1)$$ Now the integers $n$, $n+1$, and $2n+1$ are pairwise relatively prime, so for them to multiply to a square, two of them must be square, the other, twice a square. If $n$ is twice a square, then $2n$ and $2n+1$ are both squares, so $n=0$; if $n+1$ is twice a square, then $2n+1$ and $2n+2$ are both squares, which is impossible. Done.

0
On

Going nuclear:

The equation $$ m^2=\frac12n(n+1)(2n+1) $$ describes an elliptic curve.

The substitution $m=y/8$, $n=(x-2)/4$ takes it into a minimal Weierstrass form $$ y^2=x^3-4x. $$ According to LMFDB this curve has Klein four as its torsion group, consisting of points $(x,y)=\{(0,0),(2,0),(-2,0)\}$ in addition to the point at infinity. Furthermore, it is a rank zero curve, so there are no other rational points.

Consequently $(m,n)=(0,0)$ and $(m,n)=(0,-1)$ are the only integer solutions.

1
On

We want to solve a Diophantine equation $n(n+1)(2n+1)=2a^2$ for non-negative integers $n,a$. Now one of the terms on left must be even.

Clearly $2n+1$ is odd.

If $n+1$ is even, say $n=2k-1$, we have $(2k-1)k(4k-1)=a^2$. Since all terms on left hand side are pairwise coprime, it follows $4k-1=x^2$, but this gives $x^2 \equiv 3 \pmod {4}$, impossible.

If $n$ is even, say $n=2k$, by similar argument we have $k=x^2,2k+1=y^2,4k+1=z^2$. Since $y$ is odd, we have $y^2 \equiv 1 \pmod 4$, and so $2 \mid k$, say $k=2l$. Thus $2l=x^2,4l+1=y^2,8l+1=z^2$. Again since $x$ is even, we have $x^2 \equiv 0 \pmod 4$, and so $2 \mid l$, say $l=2r$. Thus $4r=x^2,8r+1=y^2,16r+1=z^2$. However, from $4r=x^2$ we have $r=m^2$, and from $16r+1=z^2$ it follows $1=z^2-16m^2=(z-4m)(z+4m)$. Since we can get this only by $1=1\cdot 1=(-1)\cdot(-1)$, both cases lead to $m=0$, thus $n=0$.