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

A138758
Index of A001203(n) (continued fraction for Pi) in A000040 (primes), or 0 if A001203(n) is not prime.
3
2, 4, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 2, 6, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 2, 3, 0, 0, 0, 0, 0, 4, 0, 1, 2, 4, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 3, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 3, 0, 0, 1
OFFSET
1,1
FORMULA
a(n) = A000720(A001203(n)) * A010051(A001203(n)).
EXAMPLE
This sequence starts 2,4,0,0,... since the 1st and 2nd terms of the continued fraction expansion of Pi, A001203 = (3, 7, 15, 1, ...) are the 2nd resp. 4th primes, while the next two terms are not primes.
PROG
(PARI) default(realprecision, 1000); t=contfrac(Pi); vector(#t, i, isprime(t[i])*primepi(t[i]))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Mar 31 2008
STATUS
approved