Possible Duplicate:
Finding Hardy Ramanujan Numbers
I need to find the lowest natural number x
where
x = k^3 + l^3 = i^3 + j^3
and (k, l, i, j)
must all be different.
I tried the following four for loops, but I couldn't get it to the right solution because of infinitely increasing variables...
for (int i=0;;i++)
for (int j=i+1;;j++)
for (int k=j+1;;k++)
for (int l=k+1;;i++)
compare(i,j,k,l);