%I #37 Aug 01 2024 23:15:46
%S 0,1,2,64,65,128,729,730,793,1458,4096,4097,4160,4825,8192,15625,
%T 15626,15689,16354,19721,31250,46656,46657,46720,47385,50752,62281,
%U 93312,117649,117650,117713,118378,121745,133274,164305,235298,262144,262145
%N Numbers that are the sum of at most 2 nonzero 6th powers.
%H Robert Israel, <a href="/A004853/b004853.txt">Table of n, a(n) for n = 1..10000</a>
%p N:= 10^7: # to get all terms <= N
%p sort(select(`<=`,[seq(seq(a^6+b^6,b=0..a),a=0..floor(N^(1/6)))],N)); # _Robert Israel_, Aug 24 2015
%t Reap[For[n = 0, n < 300000, n++, If[MatchQ[PowersRepresentations[n, 2, 6], {{_, _}, ___}], Print[n]; Sow[n]]]][[2, 1]] (* _Jean-François Alcover_, Oct 30 2017 *)
%o (PARI) lista(nn)=v = []; for (n=0, nn, v = concat(v, n^6); for (k=1, n, if ((nk=n^6+k^6) < (n+1)^7, v = concat(v, nk)););); vecsort(v); \\ _Michel Marcus_, Aug 26 2015
%Y Cf. A001014 (6th powers), A003358 (exactly 2 nonzero 6th powers).
%K nonn,easy
%O 1,3
%A _N. J. A. Sloane_