login
Primes which are the sum of three positive 7th powers.
3

%I #9 Feb 27 2017 00:56:02

%S 3,257,82499,823799,1119863,2099467,4782971,5063033,5608699,6880249,

%T 7160057,10018571,10078253,10094509,10279937,10389481,10823671,

%U 19503683,20002187,20388839,24782969,31584323,35850379,36189869,37931147,50614777,57416131,62765029,64845797,68355029,71663617,73028453

%N Primes which are the sum of three positive 7th powers.

%C Primes of form x^7 + y^7 + z^7 where x, y, z > 0.

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

%e 3 = 1^7 + 1^7 + 1^7;

%e 257 = 1^7 + 2^7 + 2^7;

%e 82499 = 3^7 + 3^7 + 5^7, etc.

%p N:= 10^9: # to get all terms <= N

%p Res:= {}:

%p for x from 1 to floor(N^(1/7)) do

%p for y from 1 to min(x, floor((N-x^7)^(1/7))) do

%p for z from 1 to min(y, floor((N-x^7-y^7)^(1/7))) do

%p p:= x^7 + y^7 + z^7;

%p if isprime(p) then Res:= Res union {p} fi

%p od od od:

%p sort(convert(Res,list)); # _Robert Israel_, Feb 26 2017

%t nn = 14; Select[Union[Plus @@@ (Tuples[Range[nn], {3}]^7)], # <= nn^7 && PrimeQ[#] &]

%o (PARI) list(lim)=my(v=List(),x7,y7,t,p); for(x=1,sqrtnint(lim\3,7), x7=x^7; for(y=x,sqrtnint((lim-x7)\2,7), y7=y^7; t=x7+y7; forstep(z=y+(x+1)%2,sqrtnint((lim-t)\1,7),2, if(isprime(p=t+z^7), listput(v,p))))); Set(v) \\ _Charles R Greathouse IV_, Feb 27 2017

%Y Cf. A001015, A003370, A007490, A085317, A085318, A085319, A283017, A283019.

%K nonn

%O 1,1

%A _Ilya Gutkovskiy_, Feb 26 2017