login
Prime numbers that are the sum of three distinct positive sixth powers.
1

%I #10 Dec 15 2015 17:06:59

%S 4889,50753,51481,66377,262937,308801,797681,840241,1000793,1046657,

%T 1772291,2303003,2986777,3032641,3107729,3365777,4757609,4804201,

%U 5135609,7530329,7534361,8061041,8065073,10516249,12394721,14638753

%N Prime numbers that are the sum of three distinct positive sixth powers.

%H Robert Israel, <a href="/A126704/b126704.txt">Table of n, a(n) for n = 1..10000</a>

%e 4889 = 2^6 + 3^6 + 4^6 = 64 + 729 + 4096.

%e 66377 = 4^6 + 5^6 + 6^6 = 4096 + 15625 + 46656.

%p N:= 10^10; # to find all terms <= N

%p A := {}:

%p for a from 1 to iroot(N,6) do

%p for b from 1 to a-1 while a^6 + b^6 < N do

%p for c from (a+b) mod 2 + 1 to b-1 by 2 do

%p r:= a^6 + b^6 + c^6;

%p if r > N then break fi;

%p if isprime(r) then A:= A union {r} fi;

%p od od od:

%p sort(convert(A,list)); # _Robert Israel_, Dec 15 2015

%t Union[Select[Total/@Subsets[Range[20]^6,{3}],PrimeQ]] (* _Harvey P. Dale_, Apr 20 2013 *)

%o (PARI) {m=16; p=m^6; w=[]; for(i=1,m-2,for(j=i+1, m-1, for(k=j+1, m, if((n=i^6+j^6+k^6)<p&&isprime(n), w=concat(w,n))))); w=vecsort(w); for(h=1, #w, print1(w[h], ","))} /* _Klaus Brockhaus_, Feb 16 2007 */

%Y Cf. A125516, A126657, A126658.

%K nonn

%O 1,1

%A _Tomas Xordan_, Feb 11 2007

%E Edited, corrected and extended by _Klaus Brockhaus_, Feb 16 2007