login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 3
7, 73, 373, 9337, 35569, 805289, 9271903 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

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

LINKS

Table of n, a(n) for n=1..7.

Carlos Rivera, Puzzle 40. The Pi Prime Search Puzzle (by Patrick De Geest), The Prime Puzzles and Problems Connection.

EXAMPLE

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

PROG

(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

CROSSREFS

Cf. A000796, A047658, A076094, A076129, A076130.

Sequence in context: A139966 A175205 A027017 * A202042 A294291 A318688

Adjacent sequences:  A076103 A076104 A076105 * A076107 A076108 A076109

KEYWORD

hard,more,nonn,base

AUTHOR

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

EXTENSIONS

Definition clarified by N. J. A. Sloane, Nov 28 2019

a(7) from Michael S. Branicky, Jul 08 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 8 22:49 EST 2021. Contains 349596 sequences. (Running on oeis4.)