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.

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