I'm trying to see if $$\frac{n(n^2+1) }{2}$$ can be a perfect square for $n$ a positive integer, but I have no idea how to...
-
2What about $n= 1$? – paulinho Nov 05 '20 at 21:49
-
Ah yeah, besides 1, forgot to mention that – StackeandoAndo Nov 05 '20 at 21:50
-
1We know the integral points on the elliptic curve $y^2=(x^3+x)/2$, see here. – Dietrich Burde Nov 05 '20 at 21:56
-
There are no other solution besides $n=1$ – Raffaele Nov 05 '20 at 22:39
1 Answers
Observe that $n$ and $n^2+1$ are coprime. Also if $ab$ is square with coprime $a,b$, both $a,b$ must be square.
Now there are two cases:
Case 1: $n$ is even. Then both $\dfrac n2$ and $n^2+1$ are squares. In particular the latter condition forces $n=0$.
Case 2: $n$ is odd. Then both $n$ and $\dfrac {n^2+1}2$ are squares. Writing $n = x^2$ we have the equation $x^4+1 = 2y^2$ for some integer $y$. As shown here (Solve in $\mathbb{Z}$ the equation $x^4 + 1 = 2y^2$.), this equation only has trivial solutions $x = \pm1$, $y= \pm 1$, giving the unique solution $n=1$.
The solution there observes that $(x^2\pm1)^2 = 2y^2\pm2x^2$, and thus $(x^4-1)^2 = 4y^4-4x^4$.
From $x^4+1=2y^2$, $x$ is odd, so the equation can be rewritten as $y^4-x^4=\left(\dfrac {x^4-1}2\right)^2$, and by Fermat's Right Triangle Theorem there are no nontrivial solutions.
- 16,413