login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A087383
Primes p such that p is a twin prime and prime(prime(p)) is also a twin prime.
1
3, 5, 7, 13, 29, 41, 43, 59, 71, 103, 107, 137, 149, 193, 199, 271, 281, 311, 347, 349, 433, 463, 569, 617, 619, 811, 827, 857, 859, 881, 1031, 1153, 1229, 1289, 1481, 1607, 1699, 1723, 1933, 1949, 1951, 1997, 2113, 2551, 2593, 2657, 3001, 3257, 3373, 3463
OFFSET
1,1
LINKS
EXAMPLE
29 is in the sequence because 29 and 31 are twin primes and prime(prime(29)) = prime(109) = 599, which is a twin prime with 601.
MATHEMATICA
TwinPrimeQ[n_]:=If[PrimeQ[n], If[PrimeQ[n-2]||PrimeQ[n+2], True, False], False](*TwinPrimeQ*) lst={}; Do[If[TwinPrimeQ[Prime[Prime[n]]]&&TwinPrimeQ[n], AppendTo[lst, n]], {n, 7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Sep 07 2008 *)
PROG
(PARI) twips(n) = { c1=0; c2=0; forprime(x=3, n, if(isprime(x+2), c1++); x1=prime(prime(x)); if(isprime(x-2) || isprime(x+2), if(isprime(x1-2) || isprime(x1+2), print1(x", "); c2++; ) ) ); print(); print(c2/c1+.0) }
CROSSREFS
Sequence in context: A224222 A224221 A128547 * A038928 A359436 A225504
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Oct 21 2003
STATUS
approved