# How can I find all solutions of this equation?

I am trying to solve this equation with integer solution $$x^3 + (x + 1)^3 + (x + 2)^3 + (x + 3)^3 + (x + 4)^3 + (x + 5)^3 + (x + 6)^3 + (x + 7)^3 = y^3.$$ I tried

Solve[{x^3 + (x + 1)^3 + (x + 2)^3 + (x + 3)^3 + (x + 4)^3 + (x +
5)^3 + (x + 6)^3 + (x + 7)^3 == y^3}, {x, y}, Integers]


and got massage

{{y -> ConditionalExpression[
Root[-784 - 420 x - 84 x^2 - 8 x^3 + #1^3 &,
1], (x |
Root[-784 - 420 x - 84 x^2 - 8 x^3 + #1^3 &, 1]) \[Element]
Integers]}}


If I tried

Solve[{x^3 + (x + 1)^3 + (x + 2)^3 + (x + 3)^3 + (x + 4)^3 + (x +
5)^3 + (x + 6)^3 + (x + 7)^3 == y^3, -1000 <= x <= 2000}, {x, y}, Integers]


I got

{{x -> -5, y -> -6}, {x -> -4, y -> -4}, {x -> -3, y -> 4}, {x -> -2,
y -> 6}}


It seems all solutions of the given equation. How can I find all solutions of the given equation?

• On version 12.2.0 the command Solve[{x^3 + (x+1)^3 + (x+2)^3 + (x+3)^3 + (x+4)^3 + (x+5)^3 + (x+6)^3 + (x+7)^3 == y^3}, {x, y}, Integers] gives all solutions: {{x->-5, y->-6}, {x->-4, y->-4}, {x->-3, y->4}, {x->-2, y->6}}. – Roman Jan 15 at 12:56
• Or Reduce[{x^3 + (x + 1)^3 + (x + 2)^3 + (x + 3)^3 + (x + 4)^3 + (x + 5)^3 + (x + 6)^3 + (x + 7)^3 == y^3}, {x, y}, Integers] – cvgmt Jan 15 at 12:58
• Or FindInstance[{x^3 + (x + 1)^3 + (x + 2)^3 + (x + 3)^3 + (x + 4)^3 + (x + 5)^3 + (x + 6)^3 + (x + 7)^3 == y^3}, {x, y}, Integers, 10] which results in {{x -> -5, y -> -6}, {x -> -4, y -> -4}, {x -> -3, y -> 4}, {x -> -2, y -> 6}} in 12.2. – user64494 Jan 15 at 13:51
• One way would be to show that there can be no solutions outside of certain bounds, and then check within those bounds exhaustively. – Daniel Lichtblau Jan 15 at 15:05

Your equation for the sum of 8 consecutive cubes becomes $$y^3=u^3+63u$$ on substitution of $$x=(u-7)/2$$.

y^3 == Simplify[784 + 420 x + 84 x^2 + 8 x^3 /. x -> (u - 7)/2]


y^3 == u (63 + u^2)

The substitution is equivalent to $$u=2x+7$$, implying $$u$$ must be odd.

$$y<$$0 requires $$u<0$$ because $$63+u^2$$ is always positive. $$y>0$$ requires odd $$u>0$$.

Rewrite the equation as the difference of two cubes $$y^3-u^3=63u$$, and expand on the comment by @DanielLichtblau.

For $$y>0$$, the minimum difference between two positive cubes occurs when $$y=u+1$$. This minimum difference is $$1+3u+3u^2$$. As positive odd $$u$$ increases, the minimum difference will eventually exceed $$63u$$ for some $$u$$.

Reduce[{1 + 3 u + 3 u^2 > 63 u, u > 0}, u, Integers]


u [Element] Integers && u >= 20

Therefore, the only possible odd positive $$u$$ are $$1\le u\le 19$$. Similarly for negative odd $$u$$ with $$-19\le u \le -1$$.

A simple search of these 20 candidates gives all 4 solutions.

{x, y} -> Select[
Table[{(u - 7)/2,
CubeRoot[784 + 420 x + 84 x^2 + 8 x^3 /. x -> (u - 7)/2]},
{u, -19, 19, 2}],
IntegerQ[#[[2]]] &]


{x, y} -> {{-5, -6}, {-4, -4}, {-3, 4}, {-2, 6}}