OFFSET
1,1
COMMENTS
Motivation for this sequence is the equation n^3 = x^2 + y^2 + z^2 where x, y and z are nonzero integers.
Corresponding cubes are 27, 125, 216, 729, 1000, 1331, 1728, 2197, 2744, 4913, 5832, 6859, 8000, 9261, 10648, 13824, 15625, 17576, 19683, 24389, 27000, ...
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
3 is a term because 3^3 = 27 = 1^2 + 1^2 + 5^2.
5 is a term because 5^3 = 125 = 5^2 + 6^2 + 8^2.
6 is a term because 6^3 = 216 = 2^2 + 4^2 + 14^2.
9 is a term because 9^3 = 729 = 2^2 + 10^2 + 25^2.
MATHEMATICA
Select[Range@ 100, Length[PowersRepresentations[#^3, 3, 2] /. {x_, _, _} /; x == 0 -> Nothing] != 0 &] (* Michael De Vlieger, Jan 13 2016 *)
PROG
(PARI) is(n) = { my(a, b) ; a=1; while(a^2+1<n, b=1 ; while(b<=a && a^2+b^2<n, if(issquare(n-a^2-b^2), return(1) ) ; b++ ; ) ; a++ ; ) ; return(0) ; }
for(n=2, 1e2, if(is(n^3), print1(n, ", ")));
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Jan 13 2016
STATUS
approved