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”).

Twin-prime-indexed primes (TWIPS): members of a pair of twin primes whose prime index is also a member of a pair of twin primes.
1

%I #11 Jan 09 2020 03:07:28

%S 5,11,17,31,41,59,109,179,191,283,599,859,1063,1153,1723,2081,2341,

%T 3001,3259,3299,4421,4549,4787,4933,6361,6661,8221,8233,8389,10009,

%U 10457,10861,13693,13709,16141,16693,16901,17387,17659,20441,20477,20773

%N Twin-prime-indexed primes (TWIPS): members of a pair of twin primes whose prime index is also a member of a pair of twin primes.

%C If there are infinitely many twin primes, this sequence has an infinite number of terms.

%H Amiram Eldar, <a href="/A087373/b087373.txt">Table of n, a(n) for n = 1..10000</a>

%e 17 is a twin prime paired with 19. The 17th prime is 59 which is also a twin prime paired with 61.

%o (PARI) twips(n) = { forprime(x=3,n, x1=prime(x); if(isprime(x-2) || isprime(x+2), if(isprime(x1-2) || isprime(x1+2), print1(x1",") ) ) ) }

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Oct 21 2003

%E Offset corrected by _Amiram Eldar_, Jan 09 2020