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-5 of 5 results.

A005042 Primes formed by the initial digits of the decimal expansion of Pi.

Original entry on oeis.org

3, 31, 314159, 31415926535897932384626433832795028841
Offset: 1

Views

Author

Keywords

Comments

The next term consists of the first 16208 digits of Pi and is too large to show here (see A060421). Ed T. Prothro found this probable prime in 2001.
A naive probabilistic argument suggests that the sequence is infinite. - Michael Kleber, Jun 23 2004

References

  • M. Gardner, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A060421 for further terms.

Programs

  • Maple
    Digits := 130; n0 := evalf(Pi); for i from 1 to 120 do t1 := trunc(10^i*n0); if isprime(t1) then print(t1); fi; od:
  • Mathematica
    a = {}; Do[k = Floor[Pi 10^n]; If[PrimeQ[k], AppendTo[a, k]], {n, 0, 160}]; a (* Artur Jasinski, Mar 26 2008 *)
    nn=1000;With[{pidigs=RealDigits[Pi,10,nn][[1]]},Select[Table[FromDigits[ Take[pidigs,n]],{n,nn}],PrimeQ]] (* Harvey P. Dale, Sep 26 2012 *)
  • PARI
    c=Pi;for(k=0,precision(c),isprime(c\.1^k) & print1(c\.1^k,",")) \\ - M. F. Hasler, Sep 01 2013

Formula

a(n) = floor(10^(A060421(n)-1)*A000796), where A000796 is the constant Pi = 3.14159... . - M. F. Hasler, Sep 02 2013

A032445 Number the digits of the decimal expansion of Pi: 3 is the first, 1 is the second, 4 is the third and so on; a(n) gives the starting position of the first occurrence of n.

Original entry on oeis.org

33, 2, 7, 1, 3, 5, 8, 14, 12, 6, 50, 95, 149, 111, 2, 4, 41, 96, 425, 38, 54, 94, 136, 17, 293, 90, 7, 29, 34, 187, 65, 1, 16, 25, 87, 10, 286, 47, 18, 44, 71, 3, 93, 24, 60, 61, 20, 120, 88, 58, 32, 49, 173, 9, 192, 131, 211, 405, 11, 5, 128, 220, 21, 313, 23, 8, 118, 99, 606
Offset: 0

Views

Author

Jeff Burch, Paul Simon (paulsimn(AT)microtec.net)

Keywords

Comments

See A176341 for a variant counting positions starting with 0, and A232013 for a sequence based on iterations of A176341. - M. F. Hasler, Nov 16 2013

Examples

			a(10) = 50 because the first "10" in the decimal expansion of Pi occurs at digits 50 and 51: 31415926535897932384626433832795028841971693993751058209749445923...
		

Crossrefs

Cf. A000796 (decimal expansion of Pi).
Cf. A080597 (terms from the decimal expansion of Pi which include every combination of n digits as consecutive subsequences).
Cf. A032510 (last string seen when scanning the decimal expansion of Pi until all n-digit strings have been seen).
Cf. A064467 (primes in Pi).

Programs

  • Mathematica
    p = ToString[FromDigits[RealDigits[N[Pi, 10^4]][[1]]]]; Do[Print[StringPosition[p, ToString[n]][[1]][[1]]], {n, 1, 100}]
    With[{pi=RealDigits[Pi,10,1000][[1]]},Transpose[Flatten[Table[ SequencePosition[ pi,IntegerDigits[n],1],{n,0,70}],1]][[1]]] (* The program uses the SequencePosition function from Mathematica version 10 *) (* Harvey P. Dale, Dec 01 2015 *)
  • PARI
    A032445(n)=my(L=#Str(n)); n=Mod(n, 10^L); for(k=L-1, 9e9, Pi\.1^k-n||return(k+2-L)) \\ Make sure to use sufficient realprecision, e.g. via \p999. - M. F. Hasler, Nov 16 2013

Formula

a(n) = A176341(n)+1. - M. F. Hasler, Nov 16 2013

Extensions

More terms from Simon Plouffe. Corrected by Michael Esposito and Michelle Vella (michael_esposito(AT)oz.sas.com).
More terms from Robert G. Wilson v, Oct 04 2001

A198019 Primes occurring in the decimal expansion of Pi (A000796), ordered by position of last digit, then by size.

Original entry on oeis.org

3, 31, 41, 5, 59, 4159, 14159, 314159, 2, 53, 653, 1592653, 89, 141592653589, 7, 97, 5897, 35897, 6535897, 5926535897, 415926535897, 79, 58979, 358979, 589793, 23, 9323, 9265358979323, 43, 643, 462643, 93238462643, 433, 83, 383, 2643383, 38462643383, 89793238462643383, 41592653589793238462643383
Offset: 1

Views

Author

M. F. Hasler, Oct 20 2011

Keywords

Comments

Cf. A198018; the only difference is that here we list the "new primes" by increasing size (for a given subsequence of A000796).
Considering the first 1, 2, 3, 4,.... digits of the decimal expansion 3.14159... of Pi, record the primes that have not occurred earlier.
Sequence A198187 lists "duplicate" primes multiple times, each time they occur anew ending in another decimal place. - M. F. Hasler, Sep 01 2013

Examples

			In Pi = 3... we have the prime a(1)=3.
In Pi = 3.1.... we have the prime a(2)=31.
In Pi = 3.14... we have no new prime.
In Pi = 3.141.... we have the prime a(3)=41.
In Pi = 3.1415.... we have the new prime a(5)=5.
In Pi = 3.14159.... we have the new primes (listed in increasing order) a(6)=59, a(7)=4159, a(8)=14159 and a(9)=314159. [_M. F. Hasler_, Sep 01 2013]
		

Crossrefs

Programs

  • PARI
    {t=Pi; u=[]; for(i=0,precision(t), for(k=1,i+1, ispseudoprime(p=t\.1^i%10^k)& !setsearch(u,p)& (u=setunion(u,Set(p)))&print1(p",")))}

A035331 Base-1000 expansion of Pi.

Original entry on oeis.org

3, 141, 592, 653, 589, 793, 238, 462, 643, 383, 279, 502, 884, 197, 169, 399, 375, 105, 820, 974, 944, 592, 307, 816, 406, 286, 208, 998, 628, 34, 825, 342, 117, 67, 982, 148, 86, 513, 282, 306, 647, 93, 844, 609, 550, 582, 231, 725, 359, 408, 128, 481, 117, 450
Offset: 0

Views

Author

Keywords

Comments

Start with a(0)=3; other terms are formed from triples of successive digits in the decimal expansion of Pi.
This sequence can be considered as a (pseudo)random generator with range 0..999. Its scatterplot graph is very similar to that of other random generators, e.g., A096558. - M. F. Hasler, May 14 2015

Examples

			Pi = 3.141 592 653 589 793 238 462 643 383 279 502 884 197 169 399 375 105 ...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Pi,1000,60][[1]] (* Harvey P. Dale, Nov 22 2015 *)
  • PARI
    default(realprecision,3*N=100);vector(N,i,Pi\1000^(1-i)%1000) \\ or: {P=Pi;vector(N,i,P\1+0*P=frac(P)*1000)} or {P=Pi/1000;vector(N,i,floor(P=frac(P)*1000))}. \\ M. F. Hasler, May 11 2015

Formula

a(n) = floor(Pi*10^(3n)) mod 1000. - M. F. Hasler, May 14 2015

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 04 2001
Better definition from Franklin T. Adams-Watters, Apr 10 2006

A198187 Primes from the decimal expansion of Pi, sorted first by the final digit index and then by length.

Original entry on oeis.org

3, 31, 41, 5, 59, 4159, 14159, 314159, 2, 5, 3, 53, 653, 1592653, 5, 89, 141592653589, 7, 97, 5897, 35897, 6535897, 5926535897, 415926535897, 79, 58979, 358979, 3, 589793, 2, 3, 23, 9323, 9265358979323, 2, 3, 43, 643, 462643, 93238462643, 3, 433, 3, 83, 383
Offset: 1

Views

Author

Keywords

Comments

In this sequence, primes are listed each time they occur (again) with a new ending position, in contrast to A198019 where only the first occurrence of each prime is listed. - M. F. Hasler, Sep 02 2013

Examples

			The first digit is 3, which is prime, so a(1) = 3.
The second digit is 1, which is no prime, but 31 is prime, so a(2) = 31.
The third digit is 4, which does not end any prime.
The fourth digit is 1, not prime, but 41 is prime, so a(3) = 41.
		

Crossrefs

Programs

  • PARI
    v=[3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3]
    for(n=1,#v,x=0;p=1;forstep(k=n,1,-1,x+=p*v[k];p*=10;if(v[k]&&isprime(x),print1(x", "))))
Showing 1-5 of 5 results.