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).

This page as a plain text file.
%I A076106 #18 Jul 08 2021 10:40:37
%S A076106 7,73,373,9337,35569,805289,9271903
%N 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).
%C A076106 a(8) requires > 1 billion digits of Pi. - _Michael S. Branicky_, Jul 08 2021
%H A076106 Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_040.htm">Puzzle 40. The Pi Prime Search Puzzle (by Patrick De Geest)</a>, The Prime Puzzles and Problems Connection.
%e A076106 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
%o A076106 (Python)
%o A076106 # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
%o A076106 with open('pi-billion.txt', 'r') as f: digits_of_pi = f.readline()[2:]
%o A076106 # from sympy import S
%o A076106 # digits_of_pi = str(S.Pi.n(72*10**4))[2:] # alternate to loading data
%o A076106 from sympy import primerange
%o A076106 def A076106_A076130(n):
%o A076106     global digits_of_pi
%o A076106     bigp, bigloc = None, -1
%o A076106     for p in primerange(10**(n-1), 10**n):
%o A076106         loc = digits_of_pi.find(str(p))
%o A076106         if loc == -1: print("not enough digits", n, p)
%o A076106         if loc > bigloc:
%o A076106             bigloc = loc
%o A076106             bigp = p
%o A076106     return (bigp, bigloc+1)
%o A076106 print([A076106_A076130(n)[0] for n in range(1, 6)]) # _Michael S. Branicky_, Jul 08 2021
%Y A076106 Cf. A000796, A047658, A076094, A076129, A076130.
%K A076106 hard,more,nonn,base
%O A076106 1,1
%A A076106 Jean-Christophe Colin (jc-colin(AT)wanadoo.fr), Oct 31 2002
%E A076106 Definition clarified by _N. J. A. Sloane_, Nov 28 2019
%E A076106 a(7) from _Michael S. Branicky_, Jul 08 2021