cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A090201 a(n) = p-th digit of Pi where p = n-th prime.

Original entry on oeis.org

1, 4, 5, 2, 5, 9, 2, 8, 6, 2, 9, 4, 1, 9, 3, 8, 9, 4, 7, 4, 6, 8, 6, 8, 7, 9, 2, 0, 6, 2, 4, 5, 2, 1, 1, 8, 7, 4, 7, 5, 5, 9, 9, 4, 3, 1, 5, 8, 6, 8, 7, 1, 5, 1, 5, 4, 6, 0, 6, 2, 3, 2, 7, 6, 6, 5, 0, 9, 3, 4, 8, 3, 0, 8, 6, 3, 9, 1, 4, 0, 9, 3, 3, 1, 1, 1, 5, 2, 9, 2, 5, 7, 7, 1, 9, 8, 3, 0, 6, 7, 2, 7, 5, 1, 6
Offset: 2

Views

Author

Cino Hilliard, Jan 22 2004

Keywords

Comments

The prime-th digits of Pi.

Examples

			The 5th prime is 11. The 11th digit of pi is 5, the 5th term in the sequence.
		

Programs

  • Mathematica
    With[{nn=600},Pick[RealDigits[Pi,10,nn][[1]],If[PrimeQ[#],1,0]&/@ Range[nn],1]] (* Harvey P. Dale, Apr 22 2012 *)
  • PARI
    \primeth.gp primeth(n) = { default(realprecision,1000); p=Str(Pi*10^999); default(realprecision,28); forprime(x=2,n, print1(mid(p,x,1)",") ) } mid(str,s,n) = { v =""; tmp = Vec(str); ln=length(tmp); for(x=s,s+n-1, v=concat(v,tmp[x]); ); return(v) }