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.

Showing 1-2 of 2 results.

A073264 Prime digits in the decimal expansion of Pi (with repetitions, in order of appearance).

Original entry on oeis.org

3, 5, 2, 5, 3, 5, 7, 3, 2, 3, 2, 3, 3, 3, 2, 7, 5, 2, 7, 3, 3, 7, 5, 5, 2, 7, 5, 2, 3, 7, 2, 2, 2, 3, 2, 5, 3, 2, 7, 7, 2, 5, 3, 2, 2, 3, 7, 3, 5, 5, 5, 2, 2, 3, 7, 2, 5, 3, 5, 2, 7, 5, 2, 2, 7, 3, 5, 2, 5, 5, 5, 2, 2, 5, 3, 3, 2, 7, 5, 5, 3, 3, 2, 7, 5, 2, 3, 3, 7, 7, 3, 5, 2, 7, 2, 5, 5, 2, 3, 3, 5, 3, 2, 2, 3
Offset: 1

Views

Author

Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 22 2002

Keywords

Comments

The prime digits in the decimal expansion of Pi, i.e., the range of this sequence, are the exactly all single digit primes, A000040(1..4) = {2, 3, 5, 7}. - M. F. Hasler, Jul 27 2024

Examples

			Pi = 3.141592653... so we get 3,5,2,5,3...
		

Crossrefs

Programs

  • Mathematica
    Select[RealDigits[Pi,10,600][[1]],PrimeQ] (* Harvey P. Dale, Jul 19 2017 *)
  • PARI
    primespi(n) = default(realprecision,100000); p = Pi/10; s = 0; default(realprecision,28); for(x=1,n, d = p*10; d1=floor(d); if(isprime(d1) ,print1(d1, ", "); s++; ); p = frac(d)); \\ Cino Hilliard, Sep 06 2003
    
  • PARI
    A073264_upto(N=100)=localprec(N*3); select(isprime, digits(Pi\1000^-N))[1..N] \\ M. F. Hasler, Jul 27 2024

Extensions

More terms from Cino Hilliard, Sep 06 2003
Offset corrected by M. F. Hasler, Jul 27 2024

A153031 Positions of prime digits of Pi.

Original entry on oeis.org

1, 5, 7, 9, 10, 11, 14, 16, 17, 18, 22, 25, 26, 28, 29, 30, 32, 34, 40, 44, 47, 48, 49, 52, 54, 57, 62, 64, 65, 67, 74, 77, 84, 87, 90, 91, 92, 94, 97, 100, 103, 110, 112, 113, 115, 116, 121, 124, 131, 132, 134, 136, 137, 138, 140, 141, 142, 143, 144, 150, 157, 159, 161
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000796.

Programs

  • Mathematica
    Flatten[Position[ Map[If[PrimeQ[ # ], "*", # ] &, RealDigits[ N[Pi, 100]][[1]]], "*"]]
    Select[ Range@ 166, PrimeQ[ RealDigits[Pi, 10, 166][[1, # ]]] &] (* Robert G. Wilson v, Dec 21 2008 *)
    Flatten[Position[RealDigits[Pi,10,200][[1]],?PrimeQ]] (* _Harvey P. Dale, Mar 22 2015 *)
  • PARI
    \p 1000
    p=Vec(Str(Pi/10)); for(n=1, #p-9, if(isprime(eval(p[n+2])), print1(n", "))) \\ Jens Kruse Andersen, Jul 23 2014

Formula

a(n) = A073303(n) + 1. - Michel Marcus, May 29 2014

Extensions

More concise Mathematica coding added and sequence extended by Robert G. Wilson v, Dec 21 2008
Showing 1-2 of 2 results.