OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
FORMULA
Primes p such that p == 1 or 3 mod 8 and p+2 is prime. - Chai Wah Wu, Jul 18 2016
EXAMPLE
3 is a term because 3 = 1^2 + 1^2 + 1^2 and 5 = 0^2 + 1^2 + 2^2.
17 is a term because 17 = 2^2 + 2^2 + 3^2 and 19 = 1^2 + 3^2 + 3^2.
41 is a term because 41 = 3^2 + 4^2 + 4^2 and 43 = 3^2 + 3^2 + 5^2.
59 is a term because 59 = 3^2 + 5^2 + 5^2 and 61 = 3^2 + 4^2 + 6^2.
MATHEMATICA
Select[Prime[Range[500]], MemberQ[{1, 3}, Mod[#, 8]] && PrimeQ[# + 2] &] (* Vincenzo Librandi, Jul 18 2016 *)
PROG
(PARI) isA004215(n) = my(fouri, j) ; fouri=1 ; while( n >=7*fouri, if( n % fouri ==0, j= n/fouri-7 ; if( j % 8==0, return(1) ) ; ); fouri *= 4 ; ) ; return(0);
t(n, p=3) = { while( p+2 < (p=nextprime( p+1 )) || n-->0, ); p-2}
for(n=1, 1e2, if(!isA004215(t(n)) && !isA004215(t(n)+2), print1(t(n), ", ")));
(Python)
from sympy import prime, isprime
A270225_list = [p for p in (prime(i) for i in range(2, 10**3)) if p % 8 not in {5, 7} and isprime(p+2)] # Chai Wah Wu, Jul 18 2016
(Magma) [p: p in PrimesUpTo(4000) | IsPrime(p+2) and p mod 8 in [1, 3]]; // Vincenzo Librandi, Jul 18 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 13 2016
STATUS
approved