# Finding variables that satisfy the condition

I'm trying to find a way to make a command giving a certain amount of variables a,b,c,d that satisfy the condition a^3+b^3+c^3=d^3. I tried using Select and FindInstance but nothing seems to work.

With FindInstance i tried the following:

FindInstance[a^3+b^3+c^3-d^3 == 0, {a, b, c, d}, Integers].


This one gives a solution with a, b, c, and d being zero. Trying to get more (meaningfull) answers gives me an error:

FindInstance[a^3+b^3+c^3-d^3 == 0, {a, b, c, d}, Integers,2].


With Select i tried the following:

Select[Na, i = RandomInteger[{0, 1000000}]; j = RandomInteger[{0, 10000}];
k = RandomInteger[{0, 10000}]; l = RandomInteger[{0, 10000}];
Na[[i]] = CubeRoot[Na[[j]]^3 + Na[[k]]^3 + Na[[l]]^3]].


The output here was a simple {}. I think it's because it's overflowing.

I'm not the best with mathematica and I have been struggling with it quite some time now. Any suggestions?

Sometimes you have to play a bit with FindInstance:

FindInstance[{a != 0, b != 0, a^3 + b^3 + c^3 - d^3 == 0}, {a, b, c,  d}, Integers, 50]


Will get 20 more solutions.

({{a -> -24794, b -> -27, c -> 27, d -> -24794}, {a -> -23516, b -> -1, c -> 1, d -> -23516}, {a -> -19417, b -> 1, c -> -1, d -> -19417}, {a -> -9119, b -> 1, c -> -1, d -> -9119}, {a -> -5795, b -> -1, c -> 1, d -> -5795}, {a -> -1038, b -> 1, c -> -1, d -> -1038}, {a -> -1, b -> 1, c -> -28, d -> -28}, {a -> -1, b -> 1, c -> -4, d -> -4}, {a -> 1, b -> -1, c -> -12, d -> -12}, {a -> 1, b -> -1, c -> -1, d -> -1}, {a -> 1761, b -> -1, c -> 1, d -> 1761}, {a -> 2037, b -> -1, c -> 1, d -> 2037}, {a -> 4351, b -> -13, c -> 13, d -> 4351}, {a -> 6447, b -> 24, c -> -24, d -> 6447}, {a -> 7245, b -> 26, c -> -26, d -> 7245}, {a -> 7488, b -> -1, c -> 1, d -> 7488}, {a -> 11003, b -> -1, c -> 1, d -> 11003}, {a -> 12731, b -> -43, c -> 43, d -> 12731}, {a -> 13238, b -> 33, c -> -33, d -> 13238}, {a -> 16732, b -> 1, c -> -1, d -> 16732}})

FindInstance[{a != 0, a^3 + b^3 + c^3 - d^3 == 0}, {a, b, c, d}, Integers]


({{a -> 1, b -> 0, c -> 0, d -> 1}})

Could be more...

FindInstance[{a != 0, b != 0, c != 0, a^3 + b^3 + c^3 - d^3 == 0}, {a, b, c, d}, Integers, 100]


will yield 100 solutions.

which points out the nice $3^3+4^3+5^3=6^3$