cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A140560 Primes p such that p + 30 is not a prime.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Jul 03 2008

Keywords

Crossrefs

Cf. A049481.

Programs

  • Magma
    [p: p in PrimesUpTo(1000)|not IsPrime(p+30)] // Vincenzo Librandi, Dec 18 2010
    
  • 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 *)
  • 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

Extensions

Corrected (3, 5 inserted) by R. J. Mathar, Apr 25 2010