A103739 Primes which are half the sum of 2 squares of primes.
17, 29, 37, 73, 89, 97, 109, 149, 157, 193, 229, 241, 269, 277, 349, 409, 433, 541, 601, 661, 709, 769, 829, 853, 929, 937, 1009, 1021, 1069, 1109, 1117, 1129, 1249, 1321, 1409, 1429, 1489, 1549, 1609, 1669, 1753, 1789, 1801, 1873, 2029, 2089, 2161, 2221
Offset: 1
Examples
17 is in the sequence because (3^2 + 5^2) / 2 = 17.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
Programs
-
Maple
Primes:= select(isprime,[seq(2*i+1,i=1..400)]): Psq:= map(`^`,Primes,2): M:= max(Psq): S:= select(t -> t <= M/2 and isprime(t),{seq(seq((Psq[i]+Psq[j])/2, j=1..i-1),i=1..nops(Psq))}): sort(convert(S,list)); # Robert Israel, Jun 08 2015
-
PARI
list(lim)=my(v=List(), p2, t); lim\=1; if(lim<9, lim=9); forprime(p=3, sqrtint(2*lim-9), p2=p^2; forprime(q=3, min(sqrtint(2*lim-p2), p), if(isprime(t=(p2+q^2)/2), listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Feb 14 2017
Extensions
Corrected and extended by Walter Nissen, Jul 19 2005
Comments