A318202 Prime numbers p such that p-3 cannot be written as sum of two twin prime numbers (not necessarily forming a pair of twin primes).
2, 3, 5, 7, 97, 101, 521, 787, 907, 911, 1117, 1151, 1361, 3251, 4211
Offset: 1
Examples
a(6) = 101 because 101 - 3 = 98 and (98 - 73 = 25, 98 - 71 = 27), (98 - 61 = 37, 98 - 59 = 39), ..., (98 - 5 = 93, 98 - 3 = 95) aren't twin primes.
Links
- David A. Corneth, PARI prog
Programs
-
Mathematica
p = Prime[Range[600]]; p2 = Select[p, PrimeQ[# - 2] || PrimeQ[# + 2] &]; Select[ p - 3, IntegerPartitions[#, {2}, p2] == {} &] + 3 (* Amiram Eldar, Nov 15 2018 *)
-
PARI
{forprime(n=2,10^4,p=n-3;forprime(t1=2,n,forprime(t2=t1,n,t12=t1+t2; if((isprime(t1-2)||isprime(t1+2))&&(isprime(t2-2)||isprime(t2+2)), if(t12==p,break(2)))));if(t12==2*n,print1(n", ")))}
-
PARI
isok(p) = {if (isprime(p), p -= 3; forprime(q = 2, p, if (isprime(r=p-q), if ((isprime(r+2) || isprime(r-2)) && (isprime(q-2) || isprime(q+2)), return (0)););); return (1));} \\ Michel Marcus, Dec 05 2018
-
PARI
\\ See Corneth link \\ David A. Corneth, Dec 05 2018
Extensions
2,3,5,7 prepended by David A. Corneth, Dec 05 2018
Comments