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

A060421 Numbers k such that the first k digits of the decimal expansion of Pi form a prime.

Original entry on oeis.org

1, 2, 6, 38, 16208, 47577, 78073, 613373
Offset: 1

Views

Author

Michel ten Voorde, Apr 05 2001

Keywords

Comments

The Brown link states that in 2001 Ed T. Prothro reported discovering that 16208 gives a probable prime and that Prothro verified that all values for 500 through 16207 digits of Pi are composites. - Rick L. Shepherd, Sep 10 2002
The corresponding primes are in A005042. - Alexander R. Povolotsky, Dec 17 2007

Examples

			3 is prime, so a(1) = 1; 31 is prime, so a(2) = 2; 314159 is prime, so a(3) = 6; ...
		

Crossrefs

Primes in other constants: A064118 (e), A065815 (gamma), A064119 (phi), A118328 (Catalan's constant), A115377 (sqrt(2)), A119344 (sqrt(3)), A228226 (log 2), A228240 (log 10), A119334 (zeta(3)), A122422 (Soldner's constant), A118420 (Glaisher-Kinkelin constant), A174974 (Golomb-Dickman constant), A118327 (Khinchin's constant).
In other bases: A065987 (binary), A065989 (ternary), A065991 (quaternary), A065990 (quinary), A065993 (senary).

Programs

  • Mathematica
    Do[If[PrimeQ[FromDigits[RealDigits[N[Pi, n + 10], 10, n][[1]]]], Print[n]], {n, 1, 9016} ]

Extensions

a(6) = 47577 from Eric W. Weisstein, Apr 01 2006
a(7) = 78073 from Eric W. Weisstein, Jul 13 2006
a(8) = 613373 from Adrian Bondrescu, May 29 2016

A064118 Numbers k such that the first k digits of e form a prime.

Original entry on oeis.org

1, 3, 7, 85, 1781, 2780, 112280, 155025
Offset: 1

Views

Author

Shyam Sunder Gupta, Sep 09 2001

Keywords

Comments

The primes are given in A007512. Sequences A065815, A119344, A136583, A210706,... are analogs for gamma, sqrt(3), sqrt(10), 3^(1/3), .... The MathWorld page about "Constant Primes" lists further examples. - M. F. Hasler, Aug 31 2013

Examples

			a(2)=3 because the 3-digit number 271 is prime.
		

References

  • C. A. Pickover, The Mathematics of Oz, "2, 271, 2718281", Chapter 95, Camb.Univ.Press, UK 2002.

Crossrefs

Cf. A001113.
Cf. A047658.

Programs

  • Mathematica
    Do[If[PrimeQ[FromDigits[RealDigits[N[E, n + 10], 10, n][[1]]]], Print[n]], {n, 1, 2300}]

Extensions

One more term from Robert G. Wilson v, Sep 28 2001
a(6) from Eric W. Weisstein, Jan 17 2005
a(7) from Eric W. Weisstein, Jul 03 2009
a(8) from Eric W. Weisstein, Oct 11 2010

A198018 Yet unseen primes occurring within the first 1,2,3,4,... digits of Pi, A000796 (ordered according to position of last, then initial digit).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Oct 20 2011

Keywords

Comments

Consider the first, then the first two, then the first three, ..., terms of A000796, i.e., decimal digits of Pi. Look whether the concatenation of a certain number of subsequent digits yields a prime which did not yet occur earlier (and thus necessarily involves the last of the considered digits). If so, add this prime to the sequence.
Contains A005042 as a subsequence.

Examples

			The first digit of the sequence is the prime a(1)=3.
The first two digits, "3.1", yield the prime a(2)=31.
In "3.14" there are no more primes. In "3.141" there is the prime a(3)=41.
In "3.1415" there is the prime a(4)=5.
In "3.14159" we have the primes 314159, 14159, 4159 and 59.
		

Crossrefs

Cf. A198019 ("new" primes ordered w.r.t. their size instead of starting position).

Programs

  • PARI
    {my(PI=digits(Pi\.1^30), seen=[]); for(i=1, #PI-1, for(j=1, i, my(p=fromdigits(PI[j..i])); !isprime(p) || setsearch(seen, p) || print1(p", ") || seen=setunion(seen,[p])))} \\ edited to use current PARI syntax by Andrew Howroyd and M. F. Hasler, May 10 2021
    
  • PARI
    {my(a=List()); for(m=0, precision(.)-3, my(pi=Pi\.1^m, p); for(k=0, m, !isprime(p=pi%10^(m-k+1)) && setsearch(Set(a), p) && listput(a,p))); a} \\ M. F. Hasler, May 10 2021

A076094 First n-digit prime encountered in decimal expansion of Pi (ignoring the initial 3).

Original entry on oeis.org

5, 41, 653, 4159, 14159, 358979, 1592653, 28841971, 795028841, 5926535897, 93238462643, 141592653589, 9265358979323, 23846264338327, 841971693993751, 8628034825342117, 89793238462643383, 348253421170679821, 3832795028841971693, 89793238462643383279
Offset: 1

Views

Author

Jean-Christophe Colin (jc-colin(AT)wanadoo.fr), Oct 31 2002

Keywords

Crossrefs

Programs

  • Mathematica
    With[{pid=Rest[RealDigits[Pi,10,1000][[1]]]},Table[Select[ FromDigits/@ Partition[ pid,n,1],PrimeQ,1],{n,20}]]//Flatten (* Harvey P. Dale, May 01 2017 *)

Extensions

More terms from Sean A. Irvine, Mar 19 2025

A065815 Numbers n such that initial n digits in decimal portion of the Euler-Mascheroni constant form a prime number.

Original entry on oeis.org

1, 3, 40, 185, 1038, 22610, 179849
Offset: 1

Views

Author

Jason Earls, Dec 06 2001

Keywords

Crossrefs

Extensions

a(6) = 22610 from Eric W. Weisstein, Apr 25 2006
a(7) = 179849 from Eric W. Weisstein, Jun 01 2011

A076106 Out of all the n-digit primes, which one takes the longest time to appear in the digits of Pi (ignoring the initial 3)? The answer is a(n), and it appears at position A076130(n).

Original entry on oeis.org

7, 73, 373, 9337, 35569, 805289, 9271903
Offset: 1

Views

Author

Jean-Christophe Colin (jc-colin(AT)wanadoo.fr), Oct 31 2002

Keywords

Comments

a(8) requires > 1 billion digits of Pi. - Michael S. Branicky, Jul 08 2021

Examples

			Of all the 2-digit primes, 11 to 97, the last one to appear in Pi is 73, at position 299 (see A076130). - _N. J. A. Sloane_, Nov 28 2019
		

Crossrefs

Programs

  • Python
    # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
    with open('pi-billion.txt', 'r') as f: digits_of_pi = f.readline()[2:]
    # from sympy import S
    # digits_of_pi = str(S.Pi.n(72*10**4))[2:] # alternate to loading data
    from sympy import primerange
    def A076106_A076130(n):
        global digits_of_pi
        bigp, bigloc = None, -1
        for p in primerange(10**(n-1), 10**n):
            loc = digits_of_pi.find(str(p))
            if loc == -1: print("not enough digits", n, p)
            if loc > bigloc:
                bigloc = loc
                bigp = p
        return (bigp, bigloc+1)
    print([A076106_A076130(n)[0] for n in range(1, 6)]) # Michael S. Branicky, Jul 08 2021

Extensions

Definition clarified by N. J. A. Sloane, Nov 28 2019
a(7) from Michael S. Branicky, Jul 08 2021

A076129 Position of first n-digit prime encountered in decimal expansion of Pi (ignoring the initial 3).

Original entry on oeis.org

4, 2, 7, 2, 1, 9, 3, 33, 29, 4, 14, 1, 5, 16, 35, 81, 11, 86, 25, 11, 24, 214, 34, 17, 16, 2, 40, 16, 233, 16, 166, 91, 250, 14, 8, 11, 30, 2, 56, 289, 3, 98, 217, 501, 47, 163, 197, 200, 127, 6, 362, 142, 10, 137, 486, 31, 229, 81, 354, 514, 333, 185, 175, 222
Offset: 1

Views

Author

Jean-Christophe Colin (jc-colin(AT)wanadoo.fr), Oct 31 2002

Keywords

Crossrefs

A229155 Number of digits of the n-th term of the decimal expansion of e = exp(1) cut into chunks of primes.

Original entry on oeis.org

1, 1, 649, 1, 1, 2, 29, 1, 1, 2, 1, 1, 1, 53, 1872, 3, 5
Offset: 1

Views

Author

M. F. Hasler, Sep 15 2013

Keywords

Comments

Trying to cut the decimal expansion A001113 of e=2.718281828... into "prime chunks", one gets (2, 7, p, 5, 3, 11, q, 7, 3, 61, 3, 3, 2, r, ...) where p, q, r are 649-, 29-, 53-digit primes, respectively. The size of p makes it impossible to register this more fundamental sequence in the OEIS as it is done in A047777 for Pi. This led us to store just the length of the terms in this sequence.
Sequence A121267 is a (not exact) analog for Pi; note that A047777 requires all primes to be distinct, while we allow repetition of 7, 3, 2, ... as seen in the above example. If we did not, the terms following 29 would be 2, 2, 6, 3, 7, 8, 3, 441, 9, 17, ... instead of 1, 1, 2, 1, 1, 1, 53, ...

Crossrefs

Programs

  • PARI
    default(realprecision,2000);c=exp(1)/10;for(k=1,9e9,ispseudoprime(c\.1^k) & !print1(k,",") & k=0*c=frac(c*10^k))

Extensions

a(15)-a(17) from Jinyuan Wang, Mar 26 2020

A065868 Initial n digits in decimal portion of golden ratio phi (or tau) = (1 + sqrt 5)/2 form a prime number.

Original entry on oeis.org

2, 14, 887, 4267, 5163, 8867, 18644, 24429, 130911
Offset: 1

Views

Author

Jason Earls, Dec 07 2001

Keywords

Comments

887 certified prime with Primo.
Note: the upper bound of 10^6 in this program has not actually been reached, so the next term may occur at any value >8867. - Ryan Propper, Aug 12 2005
Search limit is 200000. - Serge Batalov, Jun 21 2017

Crossrefs

Programs

  • Mathematica
    phi = First@ RealDigits[N[GoldenRatio - 1, 10^6 + 1]]; Do[k = FromDigits[Take[phi, n]]; If[PrimeQ[k], Print[n]], {n, 1, 10^6}] (* Ryan Propper, Aug 12 2005, edited by Michael De Vlieger, Jun 21 2017 *)

Extensions

a(4)-a(6) from Ryan Propper, Aug 12 2005
a(7)-a(9) from Serge Batalov, Jun 21 2017

A076130 Out of all the n-digit primes, which one takes the longest time to appear in the digits of Pi (ignoring the initial 3)? The answer is A076106(n) and the position where this prime appears is a(n).

Original entry on oeis.org

13, 299, 5229, 75961, 715492, 11137824, 135224164
Offset: 1

Views

Author

Jean-Christophe Colin (jc-colin(AT)wanadoo.fr), Oct 31 2002

Keywords

Comments

a(8) requires more than 10^9 digits of Pi. - Michael S. Branicky, Jul 08 2021

Examples

			Of all the 2-digit primes, 11 to 97, the last one to appear in Pi is 73, at position 299 (see A076106).  - _N. J. A. Sloane_, Nov 28 2019
		

Crossrefs

Programs

Extensions

Edited by Charles R Greathouse IV, Aug 02 2010
Definition clarified by N. J. A. Sloane, Nov 28 2019
a(7) from Michael S. Branicky, Jul 08 2021
Showing 1-10 of 10 results.