%I #15 Feb 02 2016 03:36:13
%S 3,5,6,9,10,11,12,13,14,17,18,19,20,21,22,24,25,26,27,29,30,33,34,35,
%T 36,37,38,40,41,42,43,44,45,46,48,49,50,51,52,53,54,56,57,58,59,61,62,
%U 65,66,67,68,69,70,72,73,74,75,76,77,78,80,81,82,83,84,85,86,88,89,90,91,93,94,96,97,98,99,100
%N Integers n such that n^3 is the sum of 3 nonzero squares.
%C Motivation for this sequence is the equation n^3 = x^2 + y^2 + z^2 where x, y and z are nonzero integers.
%C Corresponding cubes are 27, 125, 216, 729, 1000, 1331, 1728, 2197, 2744, 4913, 5832, 6859, 8000, 9261, 10648, 13824, 15625, 17576, 19683, 24389, 27000, ...
%H Chai Wah Wu, <a href="/A267312/b267312.txt">Table of n, a(n) for n = 1..10000</a>
%e 3 is a term because 3^3 = 27 = 1^2 + 1^2 + 5^2.
%e 5 is a term because 5^3 = 125 = 5^2 + 6^2 + 8^2.
%e 6 is a term because 6^3 = 216 = 2^2 + 4^2 + 14^2.
%e 9 is a term because 9^3 = 729 = 2^2 + 10^2 + 25^2.
%t Select[Range@ 100, Length[PowersRepresentations[#^3, 3, 2] /. {x_, _, _} /; x == 0 -> Nothing] != 0 &] (* _Michael De Vlieger_, Jan 13 2016 *)
%o (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) ; }
%o for(n=2, 1e2, if(is(n^3), print1(n, ", ")));
%Y Cf. A000408.
%K nonn
%O 1,1
%A _Altug Alkan_, Jan 13 2016
|