

A197123


a(n) is the first ndigit substring to repeat in the decimal expansion of Pi.


4



1, 26, 592, 582, 60943, 949129, 8530614, 52637962, 201890888, 4392366484, 89879780761, 756130190263, 3186120489507, 18220874234996, 276854551127715, 8230687217052243, 93415455347042966, 13724950651727463
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

a(4) is written in the sequence as a 3digit number 582 because the repeating substring is the 4digit number 0582.
a(18) should also have a leading zero: 013724950651727463. This value starts at digit 378,355,223 and at digit 1,982,424,643. This computation was performed by Richard Tobin.  Clive Tooth, Mar 06 2012


LINKS

Table of n, a(n) for n=1..18.
Dave Andersen, The PiSearch Page.
David H. Bailey, The computation of pi to 29,360,000 decimal digits using Borweins' quartically convergent algorithm, Mathematics of Computation 50 (1988), pp. 283296.
MIT Student Information Processing Board, One billion digits of Pi.


EXAMPLE

For n=2 the a(2)=26 solution is because if we look at all the 2digit substrings 14,41,15,59,92,26,... of the decimal expansion of Pi=3.1415926535897932384626 we find that the first 2digit substring to appear twice is 26.
From Bobby Jacobs, Dec 24 2016: (Start)
1 appears at positions 1 and 3.
26 appears at positions 6 and 21.
592 appears at positions 4 and 61.
0582 appears at positions 50 and 132.
60943 appears at positions 397 and 551.
949129 appears at positions 496 and 1296.
8530614 appears at positions 4167 and 4601.
... (End)


PROG

(Python)
# download https://stuff.mit.edu/afs/sipb/contrib/pi/pibillion.txt, then
# with open('pibillion.txt', 'r') as f: digits_of_pi = f.readline()
from sympy import S; digits_of_pi = str(S.Pi.n(3*10**5)) # alternatively
def a(n):
global digits_of_pi
seen = set()
for i in range(2, len(digits_of_pi)n):
ss = digits_of_pi[i:i+n]
if ss in seen: return int(ss)
seen.add(ss)
for n in range(1, 11):
print(a(n), end=", ") # Michael S. Branicky, Jan 26 2021


CROSSREFS

Cf. A000796 (Pi), A159345 (the number of digits of Pi required to include the repeated string), A279860.
Sequence in context: A160059 A323117 A293612 * A203598 A262076 A057010
Adjacent sequences: A197120 A197121 A197122 * A197124 A197125 A197126


KEYWORD

base,nonn


AUTHOR

Peter de Rivaz, Oct 10 2011


EXTENSIONS

a(16)a(18) from Clive Tooth, Mar 06 2012


STATUS

approved



