# Find all integer numbers

#### dhiab

Find all integer numbers (x,y,z) :
$$\displaystyle x^{3}+y^{3}+z^{3}=2008$$

#### oldguynewstudent

Find all integer numbers (x,y,z) :
$$\displaystyle x^{3}+y^{3}+z^{3}=2008$$
The only integers that I've found to work are (12,6,4) and (10,10,2).

So if you assign these ordered triples to x,y, and z and cycle the values you should get 12 different integer combinations of x,y, and z that will solve the equations.

#### chiph588@

MHF Hall of Honor
Find all integer numbers (x,y,z) :
$$\displaystyle x^{3}+y^{3}+z^{3}=2008$$
Sometimes I prefer brute force over deriving the solution in a creative way... This is one of those times.

We must have $$\displaystyle x,y,z<\sqrt{2008}\approx12.615987<13$$ so there are only finitely many cases to consider.

I wrote code to test these cases. Now it's not the most efficient code but hey it gets the job done.

Code:
for(int x=0;x<13;x++){
for(int y=0;y<13;y++){
for(int z=0;z<13;z++){
if(x*x*x+y*y*y+z*z*z==2008){
std::cout<<"(x,y,z)=("<<x<<","<<y<<","<<z<<")"<<std::endl;
}}}}
And here is the output i.e. all solutions:
Code:
(x,y,z)=(2,10,10)
(x,y,z)=(4,6,12)
(x,y,z)=(4,12,6)
(x,y,z)=(6,4,12)
(x,y,z)=(6,12,4)
(x,y,z)=(10,2,10)
(x,y,z)=(10,10,2)
(x,y,z)=(12,4,6)
(x,y,z)=(12,6,4)
So as you can see there are $$\displaystyle 9$$ solutions.
However if you disregard order there are $$\displaystyle 2$$ solutions namely $$\displaystyle (x,y,z)=(12,6,4) \text{ and } (10,10,2)$$, as oldguynewstudent has already pointed out.

Edit: I just realized you wanted your equation solved over $$\displaystyle \mathbb{Z}$$, not $$\displaystyle \mathbb{N}$$. This throws my idea right out the window...

May I ask what this is for?

Last edited:
• dhiab

#### Xitami

Code:
2550 -2466 -1166
1735 -1654  -887
1222 -1058  -862
361 -289  -284
13   -5    -4
-6   13     3
6   12     4
2   10    10
-113  108    57
-180  166   108
-1340 1336   278
-1152 1128   454
-5274 5269   747
-3770 3760   752
-2276 2246   772
surely more

Last edited:
• dhiab

#### chiph588@

MHF Hall of Honor
• dhiab