login
A140560
Primes p such that p + 30 is not a prime.
1
2, 3, 5, 19, 47, 61, 89, 103, 113, 131, 139, 157, 173, 179, 191, 223, 229, 257, 269, 271, 293, 311, 313, 331, 347, 373, 383, 397, 421, 439, 443, 463, 467, 487, 499, 503, 509, 521, 523, 593, 599, 607, 619, 641, 659, 673, 677, 683, 691, 701, 719, 733, 751, 761
OFFSET
1,1
LINKS
MAPLE
A140560:=n->`if`(isprime(n) and not isprime(n+30), n, NULL): seq(A140560(n), n=1..2*10^3); # Wesley Ivan Hurt, Apr 14 2017
MATHEMATICA
Select[Prime[Range[200]], !PrimeQ[#+30]&] (* Harvey P. Dale, Oct 21 2013 *)
PROG
(Magma)[p: p in PrimesUpTo(1000)|not IsPrime(p+30)] // Vincenzo Librandi, Dec 18 2010
(PARI) isok(n) = isprime(n) && !isprime(n+30); \\ Michel Marcus, Apr 14 2017
(Python)
from sympy import isprime, primerange
print([p for p in primerange(1, 1001) if not isprime(p + 30)]) # Indranil Ghosh, Apr 14 2017
CROSSREFS
Cf. A049481.
Sequence in context: A359939 A038705 A066754 * A118625 A031133 A352604
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected (3, 5 inserted) by R. J. Mathar, Apr 25 2010
STATUS
approved