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

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

Original entry on oeis.org

1, 26, 592, 582, 60943, 949129, 8530614, 52637962, 201890888, 4392366484, 89879780761, 756130190263, 3186120489507, 18220874234996, 276854551127715, 8230687217052243, 93415455347042966, 13724950651727463, 1350168131352524443, 84756845106452435773, 585270898631522188621, 2761994111668451704865, 64722721994615606186022, 307680366924568801265656
Offset: 1

Views

Author

Peter de Rivaz, Oct 10 2011

Keywords

Comments

a(4) is written in the sequence as a 3-digit number 582 because the repeating substring is the 4-digit 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

Examples

			For n=2 the a(2)=26 solution is because if we look at all the 2-digit substrings 14,41,15,59,92,26,... of the decimal expansion of Pi=3.1415926535897932384626 we find that the first 2-digit 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)
		

Crossrefs

Cf. A000796 (Pi), A159345 (the number of digits of Pi required to include the repeated string), A279860.

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

Extensions

a(16)-a(18) from Clive Tooth, Mar 06 2012
a(19)-a(22) from Jeff Sponaugle, Aug 22 2024
a(23) from Jeff Sponaugle, Sep 23 2024
a(24) from Jonas Schmitz, Dec 16 2024

A259443 The position of the first occurrence in the decimal expansion of Pi of n identical digits.

Original entry on oeis.org

1, 3, 10, 24, 25, 27, 43, 45, 55, 58, 62, 79, 80, 100, 107, 113, 124, 134, 147, 150, 152, 161, 171, 186, 197, 204, 205, 222, 228, 233, 236, 255, 267, 273, 278, 293, 296, 303, 321, 334, 337, 354, 373, 380, 386, 392, 400, 432, 437, 438, 442, 445, 446, 471, 483, 490, 494, 495, 499
Offset: 1

Views

Author

Keywords

Comments

A test for normality.

Examples

			a(2) = 3 since the digit 1 occurs twice by the third place in the decimal expansion of Pi, i.e., "141".
a(3) = 10 since the digit 5 occurs three times by the tenth place in the decimal expansion of Pi, i.e., "1415926535".
		

Crossrefs

Programs

  • Mathematica
    pi3 = RealDigits[Pi - 3, 10, 1000][[1]]; f[n_] := f[n] = Block[{k = f[n - 1] + 1}, While[ Max[ Transpose[ Tally[ Take[pi3, k]]][[2]]] != n, k++]; k]; f[0] = 0; Array[f, 60]

Formula

a(n) ~ 10*n and a(n-1) < a(n).
a(10) = 58, a(100) = 882, a(1000) = 9619, a(10000) = 98564, a(100000) = 996482.

A331882 a(n) is the number of digits in the decimal expansion of the fractional part of Pi needed to contain n occurrences of an n-digit substring.

Original entry on oeis.org

1, 22, 219, 1805, 25499, 168882, 3566679, 29325629
Offset: 1

Views

Author

Stijn Dierckx, Jan 30 2020

Keywords

Examples

			a(1) = 1, because we need 1 digit to have the first 1-digit substring ('1') appearing 1 time;
a(2) = 22, because we need 22 digits (1415926535897932384626) to have the first 2-digit substring ('26') appearing 2 times;
a(3) is 219, because we need 219 digits (1415....933446) to have the first 3-digit substring ('446') appearing 3 times;
and so on.
		

Crossrefs

Cf. A000796, A159345, A331881 (the repeated n-digit substrings).
Showing 1-3 of 3 results.