login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A126107 Primes p such that 2p+1 and 2p+3 are twin primes. 9
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(2)=5 because 2*5+1=11 and 2*5+3=13 are twin primes.
MATHEMATICA
Do[p = Prime[ i]; If[PrimeQ[2p + 1] && PrimeQ[2p + 3], Print[p]], {i, 1, 10000}] - Michael Taktikos, Apr 01 2007
Select[Prime[Range[10000]], PrimeQ[2 # + 1] && PrimeQ[2 # + 3] &] (* Vincenzo Librandi, Feb 15 2014 *)
PROG
(Magma) [p: p in PrimesUpTo(10000) | IsPrime(2*p+1) and IsPrime(2*p+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
CROSSREFS
Cf. A128436 (primes p such that 2p-3 and 2p-1 are twin primes).
Sequence in context: A103579 A161500 A061351 * A193901 A083472 A213996
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Mar 05 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 13:50 EDT 2024. Contains 371780 sequences. (Running on oeis4.)