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

A088971
Number of twin prime pairs between consecutive prime-indexed primes of order 3. The bounds are included in the calculation.
2
3, 5, 8, 12, 9, 16, 12, 15, 33, 16, 32, 19, 12, 23, 27, 31, 7, 54, 24, 14, 32, 30, 33, 54, 38, 20, 17, 14, 18, 104, 25, 30, 26, 57, 17, 52, 41, 25, 50, 40, 20, 69, 21, 30, 16, 85, 135, 18, 18, 22, 28, 28, 65, 26, 63, 64, 17, 45, 29, 15, 93, 115, 41, 13, 21, 129, 56, 80, 17, 25, 31, 59, 70, 70, 37, 33, 41, 42, 58, 92
OFFSET
1,1
COMMENTS
This sequence contains no 0's between x=1 to 33000. The interval [PIPS3(4133), PIPS3(4134)] contains 1 twin prime pair; the interval [PIPS3(8268), PIPS3(8269)] contains 2 twin prime pairs.
FORMULA
PIPS3(x) = A049090(x) = the x-th prime-indexed prime of order 3 = prime(prime(prime(prime(x)))) where prime(x) is the x-th prime. a(n) = count of twins in [PIPS3(n), PIPS3(n+1)].
EXAMPLE
a(1) = 3, since there are three pairs of twin primes at least PIPS3(1) = 11 and at most PIPS3(2) = 31: (11,13), (17,19), and (29,31).
PROG
(PARI) piptwins3(m, n) = { for(x=m, n, f=1; c=0; p1 = prime(prime(prime(prime(x)))); p2 = prime(prime(prime(prime(x+1)))); forprime(j=p1, p2-2, if(isprime(j+2), f=0; c++) ); print1(c", "); ) }
(Sage)
def PIP(n, i): # Returns the n-th prime-indexed prime of order i.
if i==0:
return primes_first_n(n)[n-1]
else:
return PIP(PIP(n, i-1), 0)
def A088971(n): # Returns a(n)
return len([i for i in range(PIP(n, 3), PIP(n+1, 3), 2) if (is_prime(i) and is_prime(i+2))])
A088971(1) # Danny Rorabaugh, Mar 30 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Oct 30 2003
EXTENSIONS
Edited to count twin pairs entirely within [PIPS3(n), PIPS3(n+1)], rather than pairs with the first prime in that interval. - Danny Rorabaugh, Apr 01 2015
STATUS
approved