login
Primes p such that p+2 is not a prime.
44

%I #18 Sep 08 2022 08:45:05

%S 2,7,13,19,23,31,37,43,47,53,61,67,73,79,83,89,97,103,109,113,127,131,

%T 139,151,157,163,167,173,181,193,199,211,223,229,233,241,251,257,263,

%U 271,277,283,293,307,313,317,331,337,349,353,359,367,373,379,383,389

%N Primes p such that p+2 is not a prime.

%C Primes n such that n!*B(n+1) is an integer where B(k) are the Bernoulli numbers.

%C All primes except for the lower members of twin primes - i.e. remove 3, 5, 11, 17, 29, 41, 59, 71, 101, 107, 137, ... - _Gerard Schildberger_, Feb 13 2005

%H T. D. Noe, <a href="/A067774/b067774.txt">Table of n, a(n) for n = 1..1000</a>

%F Except for a(1)=2, a(n+1)=A049591(n).

%F a(n) ~ n log n. - _Charles R Greathouse IV_, Jul 01 2013

%t f[n_]:=PrimeQ[n+2]; lst={}; Do[p=Prime[n]; If[ !f[p], AppendTo[lst,p]], {n,5!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Oct 17 2009 *)

%o (Magma) [p: p in PrimesUpTo(400) | NextPrime(p)-p ne 2]; // _Bruno Berselli_, Apr 09 2013

%o (PARI) is(n)=isprime(n)&&!isprime(n+2) \\ _Charles R Greathouse IV_, Jul 01 2013

%Y Cf. A049591.

%Y Complement of A001359 in A000040, A025584, A007510.

%K nonn,easy

%O 1,1

%A _Benoit Cloitre_, Feb 06 2002

%E Better description from _Vladeta Jovovic_, Dec 14 2002