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.

A271982 Primes p such that p + 42 is also prime.

Original entry on oeis.org

5, 11, 17, 19, 29, 31, 37, 41, 47, 59, 61, 67, 71, 89, 97, 107, 109, 131, 137, 139, 149, 151, 157, 181, 191, 197, 199, 227, 229, 239, 241, 251, 269, 271, 307, 311, 317, 331, 337, 347, 359, 367, 379, 389, 397, 401, 419, 421, 449, 457, 461
Offset: 1

Views

Author

Karl V. Keller, Jr., Apr 17 2016

Keywords

Comments

A134120 is a subsequence of this sequence.

Examples

			5 is a term because 5 + 42 = 47 is also prime.
11 is a term because 11 + 42 = 53 is also prime.
		

Crossrefs

Programs

  • Maple
    A271982:=n->`if`(isprime(n) and isprime(n+42), n, NULL): seq(A271982(n), n=1..10^3); # Wesley Ivan Hurt, Feb 12 2017
  • Mathematica
    Select[Prime@ Range@ 90, PrimeQ[# + 42] &] (* Michael De Vlieger, Apr 18 2016 *)
  • PARI
    lista(nn) = forprime(p=2, nn, if (isprime(p+42), print1(p, ", "))); \\ Michel Marcus, Apr 19 2016
  • Python
    from sympy import isprime
    for i in range(3,2001,2):
        if isprime(i) and isprime(i+42): print (i,end=', ')