This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A138854 #22 May 09 2021 11:20:08 %S A138854 160,378,476,495,1366,1464,1483,1682,1701,1799,2232,2330,2349,2548, %T A138854 2567,2665,3536,3555,3653,3871,4948,5046,5065,5264,5283,5381,6252, %U A138854 6271,6369,6587,6894,6992,7011,7118,7137,7210,7229,7235,7327,7453,8198,8217,8315 %N A138854 Numbers which are the sum of three cubes of distinct primes. %C A138854 This is a subsequence of A024975. The odd terms of this sequence are A138853, the even terms are 8+{ even terms of A120398 }. Thus primes in this sequence, A137365, are the same as primes in A138853. %H A138854 Chai Wah Wu, <a href="/A138854/b138854.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..621 from R. J. Mathar) %H A138854 <a href="/index/Su#ssq">Index to sequences related to sums of cubes</a>. %F A138854 A138854 = { p(i)^3+p(j)^3+p(k)^3 ; i>j>k>0 } = A138853 union { p(i)^3+p(j)^3+8 ; i>j>1} %p A138854 isA030078 := proc(n) %p A138854 local f ; %p A138854 if n < 8 then %p A138854 false; %p A138854 else %p A138854 f := ifactors(n)[2] ; %p A138854 if nops(f) = 1 and op(2,op(1,f)) = 3 then %p A138854 true; %p A138854 else %p A138854 false; %p A138854 end if; %p A138854 end if; %p A138854 end proc: %p A138854 isA138854 := proc(n) %p A138854 local i,j,p,q,r,rcub ; %p A138854 for i from 1 do %p A138854 p := ithprime(i) ; %p A138854 if p^3+(p+1)^3+(p+2)^3 > n then %p A138854 return false; %p A138854 end if; %p A138854 for j from i+1 do %p A138854 q := ithprime(j) ; %p A138854 rcub := n-q^3-p^3 ; %p A138854 if rcub <= q^3 then %p A138854 break; %p A138854 fi ; %p A138854 if isA030078(rcub) then %p A138854 return true; %p A138854 end if; %p A138854 end do: %p A138854 end do: %p A138854 end proc: %p A138854 for n from 5 do %p A138854 if isA138854(n) then %p A138854 print(n); %p A138854 end if; %p A138854 end do: # _R. J. Mathar_, Jun 09 2014 %t A138854 f[upto_]:=Module[{maxp=PrimePi[Floor[Power[upto, (3)^-1]]]}, Select[Union[Total/@(Subsets[Prime[Range[maxp]],{3}]^3)],#<=upto&]]; f[9000] (* _Harvey P. Dale_, Mar 21 2011 *) %o A138854 (PARI) isA138854(n)={ if( n%2, isA138853(n), isA120398(n-8)) } %o A138854 for( n=1,10^4, isA138854(n) & print1(n", ")) %Y A138854 Cf. A024975 (a^3+b^3+c^3, a>b>c>0), A138853 (odd terms of this), A120398, A137365 (primes in A138853 / A138854). %K A138854 nonn %O A138854 1,1 %A A138854 _M. F. Hasler_, Apr 13 2008