# Sum of three consecutive cubes equals a perfect square

I have found this problem in an old German textbook: Find all sets of three consecutive integers such that the sum of their cubes is a perfect square.

We can write $$S = (x-1)^3 + x^3 + (x+1)^3 = (x-1+x+1)((x-1)^2 - (x-1)(x-1) + (x+1)^2) + x^3$$ which reduces to $$S = 3x(x^2 + 2).$$

If we set $x^2 + 2 = 3x$, we get $$x^2 - 3x + 2 = 0 \iff (x-1)(x-2) = 0$$ and we thus obtain the solutions $(0,1,2)$ and $(1,2,3)$.

At first I conjectured that these are the only solutions, but I couldn't prove this. However, I was wrong: $(23,24,25)$ also satisfies the relationship.

It is worth noting that these are the only solutions for $x \leq 100000$. Can anyboy help me prove that these are the only ones? Or otherwise, help me find all other triples?

• As $(x^2+2,x)|2$ $3$ can divide exactly one of $x,x^2+2$ If $x$ is odd, either $x=3p^2, x^2+2=r^2$ or $x=p^2,x^2+2=3r^2$ If $x$ is even $=2y$(say), $S=6y(4y^2+2)=12y(2y^2+1)\implies3y(2y^2+1)$ needs to be perfect square As $(y,2y^2+1)=1,$ either $y=3a^2,2y^2+1=b^2$ or $y=c^2,2y^2+1=3d^2$ – lab bhattacharjee May 5 '16 at 16:52
• A detailed case analysis might be unavoidable, but I think that this problem can be done by working in the UFD $\mathbb{Z}[\sqrt{2}]$. – Slade May 5 '16 at 16:58
• The specified textbook from where the question comes from states it as a grade 7 problem. I think that case analysis is the expected way of solving it, since unique factorization domains are quite out of reach for a seventh grader. – Tanny Sieben May 5 '16 at 17:12
• I am unable to access the article at the moment, but in a 1983 issue of Mathematical Gazette here, it is shown that your two positive integer solutions are the only ones. – Slade May 5 '16 at 17:15
• This is an old result of Cassels. It is unlikely that a seventh grader could prove it. – Mike Bennett May 6 '16 at 1:57