Sum of three consecutive cubes equals a perfect square

1.7k Views Asked by At

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?

2

There are 2 best solutions below

0
On

What you can do (but not ask from seventh graders) is to turn the equation into an elliptic curve in Weierstrass normal form, by multiplying both sides by $9$ and putting $9S=Y^2$ and $X=3x$. Then we get $$Y^2=X^3+18X$$ which indeed denotes an elliptic curve and we can use for instance SageMath to return its integral points: $(0, 0), (3, 9), (6, 18), (72, 612)$. Then we find $x=0,1,2,24$.

In fact, something similar can be done if we have an odd number, say $2t+1$ of consecutive cubes whose sum must be a perfect square. If we let $n^3$ be the central element of the cubes, the sum is $(n-t)^3+\cdots +n^3+\cdots +(n+t)^3=(2t+1)n^3+6n(1+4+\cdots +t^2)=(2t+1)n^3+t(t+1)(2t+1)n$

We know this is a square when $n=t,t+1$ (since the sum of the first $k$ cubes is a perfect square), and less obvious, but easy to verify, is that $n=4t(t+1)(2t+1)$ (which is $24$ times the sum of the first $t$ squares) is also a solution.

0
On

Here is an approachable (but not exhaustive) algebraic route to obtain the solution $23,24,25$.

OP obtains $S=3x(x^2+2)$. Plainly, $x^2+2$ cannot itself be a square (there are no two integer squares which differ by $2$), so OP makes the (limiting) assumption that to obtain a square, you must set $3x=x^2+2$. It is also possible, however, that $3x=a\cdot b^2$ and $x^2+2=a\cdot c^2$, yielding a product $a^2b^2c^2$. Furthermore, since we have one explicit factor of $3$ to account for, one of $x$ or $x^2+2$ must contain another factor of $3$.

Let's assume here that $x=3k$. Then $3x(x^2+2)=9k(9k^2+2)$; and if that is a square, then so is $k(9k^2+2)$. Now $gcd(k,(9k^2+2))=1,2$. If it is $1$, then $k=d^2$ and $(9k^2+2)=9d^4+2$. But this is impossible because $9d^4+2$ is $2$ greater than a square, and therefore cannot be a square.

So we conclude that $k=2n$ and $k(9k^2+2)=2n(36n^2+2)=4n(18n^2+1)$. Again, since this last expression is a square, so is $n(18n^2+1)$. Here, $gcd(n,(18n^2+1))=1$, so we arrive at $n=d^2$ and $18n^2+1=18d^4+1$.

$18d^4+1=m^2$ has the solution $d=2,m=17$, from which $n=4,k=8,x=24$, yielding the overall solution $23,24,25$.