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.

A126107 Primes p such that 2*p+1 and 2*p+3 are twin primes.

Original entry on oeis.org

2, 5, 29, 53, 89, 113, 173, 509, 659, 743, 809, 1013, 1499, 1559, 1583, 1733, 2063, 2129, 2273, 2393, 2399, 2549, 2819, 2939, 3329, 3389, 3413, 3779, 4409, 5003, 5849, 6053, 6269, 7193, 7433, 7643, 7823, 8069, 8093, 8513, 8693, 9029, 9059, 9539, 9689
Offset: 1

Views

Author

Zak Seidov, Mar 05 2007

Keywords

Examples

			a(2)=5 because 2*5+1=11 and 2*5+3=13 are twin primes.
		

Crossrefs

Cf. A128436 (primes p such that 2*p-3 and 2*p-1 are twin primes).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | IsPrime(2*p+1) and IsPrime(2*p+3)]; // Vincenzo Librandi, Feb 15 2014
    
  • Mathematica
    Do[p = Prime[ i]; If[PrimeQ[2p + 1] && PrimeQ[2p + 3], Print[p]], {i, 1, 2000}] (* Michael Taktikos, Apr 01 2007 *)
    Select[Prime[Range[10000]], PrimeQ[2 # + 1] && PrimeQ[2 # + 3] &] (* Vincenzo Librandi, Feb 15 2014 *)
  • PARI
    is(p)=isprime(2*p+1) && isprime(2*p+3) && isprime(p) \\ Charles R Greathouse IV, Mar 03 2018
    
  • PARI
    list(lim)=my(v=List(),p=3); forprime(q=5,2*lim+3, if(q-p==2 && isprime(p\2), listput(v,p\2)); p=q); Vec(v) \\ Charles R Greathouse IV, Mar 03 2018