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-10 of 21 results. Next

A057679 Self-locating strings within Pi: numbers n such that the string n is at position n in the decimal digits of Pi, where 3 is the first digit.

Original entry on oeis.org

5, 242424, 271070, 9292071, 29133316, 70421305, 215817165252, 649661007154
Offset: 1

Views

Author

Mike Keith, Oct 19 2000

Keywords

Comments

The average number of matches of length "n" digits is exactly 0.9. That is, we expect 0.9 matches with 1 digit, 0.9 matches with 2 digits, etc. Increasing the number of digits by a factor of 10 means that we expect to find 0.9 new matches. Increasing the search from 10^11 to 10^12 (which includes 10 times as much work) would thus only expect to find 0.9 new matches. - Alan Eliasen, May 01 2013 (corrected by Michael Beight, Mar 21 2020)
a(2) is not the first occurrence of 242424 in Pi (which is at position 242422) but the second. - Hans Havermann, Jul 26 2014
a(9) is greater than 5 * 10^13. - Kang Seonghoon, Nov 02 2020

Examples

			5 is a term because 5 is the 5th digit of Pi (3.1415...).
		

Crossrefs

Programs

  • Mathematica
    StringsinPi[m_] := Module[{cc = 10^m + m, sol, aa}, sol = Partition[RealDigits[Pi,10,cc] // First, m, 1]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i,Length[sol]}];] (* For example, StringsinPi[6] returns all 6-digit members of the sequence. - Colin Rose, Mar 15 2006 *)
    dpi = RealDigits[Pi, 10, 10000010][[1]]; Select[Range[10000000], FromDigits[Take[dpi, {#, # - 1 + IntegerLength[#]}]] == # &] (* Vaclav Kotesovec, Feb 18 2020 *)

Extensions

a(4)-a(6) from Colin Rose, Mar 15 2006
a(7) from Alan Eliasen, May 10 2013
a(8) from Alan Eliasen, Jun 06 2013
Name clarified by Kang Seonghoon, Nov 02 2020

A109513 Let k be an m-digit integer. Then k is a Pithy number if the k-th m-tuple in the decimal digits of Pi (after the decimal point) is the string k.

Original entry on oeis.org

1, 19, 94, 3542, 7295, 318320, 927130, 939240, 688370303, 7682437410, 7996237896, 89594051933
Offset: 0

Views

Author

Colin Rose, Jul 01 2005

Keywords

Examples

			1 is a term because the first digit in Pi (after the decimal point) is 1.
19 is a term because the 19th pair of digits (after the decimal point) in Pi is 19:
      1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19
  3. 14 15 92 65 35 89 79 32 38 46 26 43 38 32 79 50 28 84 19 ...
		

Crossrefs

Programs

  • Mathematica
    PithyNumbers[m_] := Module[{cc = m(10^m)+m, sol, aa}, sol = Partition[RealDigits[Pi, 10, cc] // First // Rest, m]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i, Length[sol]}];] Example: PithyNumbers[4] produces all 4-digit Pithy numbers

Extensions

a(8)-a(11) from J. Volkmar Schmidt, Dec 17 2023

A109514 Let k be an integer consisting of m digits. Then k is a Pithy number if the k-th m-tuple in the decimal digits of Pi is k.

Original entry on oeis.org

5, 9696, 19781, 199898, 687784863, 4518673035, 7526556436
Offset: 1

Views

Author

Colin Rose, Jul 01 2005

Keywords

Comments

A near-miss '02805451' occurs at position 2805451. - Vaclav Kotesovec, Feb 19 2020

Examples

			5 is a term because the 5th single digit in Pi is 5.
9696 is a term because the 9696th quadruplet in Pi is 9696.
		

Crossrefs

Programs

  • Mathematica
    PithyNumbersWith3[m_] := Module[{cc = m(10^m)+m, sol, aa}, sol = Partition[RealDigits[Pi, 10, cc] // First, m]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i, Length[sol]}];]
    (* Example: PithyNumbersWith3[5] produces all 5-digit Pithy numbers *)

Extensions

a(5)-a(7) from J. Volkmar Schmidt, Dec 17 2023

A064810 Self-locating strings within Pi: numbers n such that the string n is at position n in the decimal digits of Pi, where 1 is the 0th digit.

Original entry on oeis.org

6, 27, 13598, 43611, 24643510, 71683711, 78714901, 268561754, 4261759184, 82638677082, 548535559133, 8773143366618
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 22 2001

Keywords

Comments

Near-misses '04658726522' and '0769960191236' occur at positions 4658726522 and 769960191236, respectively. - Kang Seonghoon, Nov 02 2020
a(13) > 5 * 10^13. - Kang Seonghoon, Nov 02 2020

Examples

			6 is the first term because Pi is 3.1415926... and the digit 6 is in position 6 after the decimal point when the first 1 after the decimal point is considered to be at position 0.
		

Crossrefs

Programs

  • Mathematica
    Do[If[RealDigits[Pi,10,a=i+IntegerLength@i-1,-2][[1,i;;a]]==IntegerDigits@i,Print@i],{i,50000}] (* Giorgos Kalogeropoulos, Feb 21 2020 *)
  • 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, isprime
    # digits_of_pi = str(S.Pi.n(3*10**5))[2:] # alternate to loading data
    def afind():
        global digits_of_pi
        for k in range(len(digits_of_pi)):
            s = str(k)
            if digits_of_pi[k:k+len(s)] == s: print(k, end=", ")
    afind() # Michael S. Branicky, Jun 27 2021

Extensions

a(6)-a(10) from Alan Eliasen, May 11 2013
a(11) from Alan Eliasen, May 28 2013
a(12) added and name clarified by Kang Seonghoon, Nov 02 2020
Error in a(11) reported by Sergey Prokudin, edited by Robert Price, Mar 14 2022

A153221 Numbers k such that the string k is found at position k-3 in the decimal digits of Pi.

Original entry on oeis.org

51, 875, 62843, 242424, 4308765, 9710721, 24747689, 126987778
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(1) = 51 because 51 occurs at offset (51-3) after the decimal in the digits of Pi.
		

Crossrefs

Programs

  • Python
    from sympy import S
    # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
    #with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
    pi_digits = str(S.Pi.n(3*10**5+2))[:-2] # alternative to above
    pi_digits = pi_digits.replace(".", "")
    def ispal(s): return s == s[::-1]
    def afind():
        for k in range(len(pi_digits)):
            sk = str(k)
            if sk == pi_digits[k-3:k-3+len(sk)]:
                print(k, end=", ")
    afind() # Michael S. Branicky, Jan 30 2022

Extensions

a(5)-a(8) from Michael S. Branicky, Jan 30 2022

A153223 Numbers k such that the string k is found at position k-4 in the decimal digits of Pi.

Original entry on oeis.org

9, 233, 1614, 9218, 27755974, 81259258, 120526011, 238732548, 651265325, 783609697
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(1) = 9 because 9 occurs at offset (9-4) after the decimal in the digits of Pi.
		

Crossrefs

Programs

  • Python
    from sympy import S
    # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
    #with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
    pi_digits = str(S.Pi.n(3*10**5+2))[:-2] # alternative to above
    pi_digits = pi_digits.replace(".", "")
    def afind():
        for k in range(5, len(pi_digits)):
            sk = str(k)
            if sk == pi_digits[k-4:k-4+len(sk)]:
                print(k, end=", ")
    afind() # Michael S. Branicky, Jan 30 2022

Extensions

a(5)-a(10) from Michael S. Branicky, Jan 30 2022

A153224 Numbers k such that the string k is found at position k-5 in the decimal digits of Pi.

Original entry on oeis.org

26, 32, 41, 86, 2799, 469113068
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(1) = 26 because 26 occurs at offset (26-5) after the decimal in the digits of Pi.
		

Crossrefs

Programs

  • Python
    from sympy import S
    # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
    #with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
    pi_digits = str(S.Pi.n(3*10**5+2))[:-2] # alternative to above
    pi_digits = pi_digits.replace(".", "")
    def afind():
        for k in range(6, len(pi_digits)):
            sk = str(k)
            if sk == pi_digits[k-5:k-5+len(sk)]:
                print(k, end=", ")
    afind() # Michael S. Branicky, Jan 30 2022

Extensions

a(6) from Michael S. Branicky, Jan 30 2022

A205648 Self-locating strings within e: numbers n such that the string n is at position n (after the decimal point) in decimal digits of e.

Original entry on oeis.org

338, 2543, 91668, 170596, 420297, 33909384
Offset: 1

Views

Author

Jingwei Liu, Jan 30 2012

Keywords

Comments

a(7) is greater than 10^9.
Heuristically (assuming e is 10-normal and in the absence of any 'conspiracy' amongst the digits) about 1 - exp(-0.9) = 59.3...% of the time there is some d-digit number in this sequence, and a(n) is on the order of 12.9...^(n + o(1)). [Charles R Greathouse IV, Mar 16 2012]

Crossrefs

Cf. A001113.
Similar to A057680 (self-locating strings within Pi).

Programs

  • C
    See Liu & Pan link.

A239316 Index of the first occurrence of a string of exactly n consecutive odd digits in the decimal expansion of Pi.

Original entry on oeis.org

18, 1, 4, 13, 282, 342, 783, 43, 4424, 412, 940, 8337, 44968, 61667, 33821, 106904, 336404, 421527, 31488, 1850725, 5854551, 8996526, 11709660, 2493200, 105887707, 86401248, 701257139, 546257302, 92438127
Offset: 1

Views

Author

Kival Ngaokrajang, Mar 15 2014

Keywords

Examples

			Digit:       1 2 3 4 5 6 7 8 9 10 11 12 ...18 ...
Pi:          3 1 4 1 5 9 2 6 5  3  5  8 ....3 ...
Odd string:  [2]...[ 3 ].....[  3  ].......[1]...
             .       .                      .
             .       .                      .
            a(2)    a(3)                   a(1)
            = 1     = 4                    = 18
		

Crossrefs

Programs

  • Mathematica
    a239316[n_, checkDigits_: 100000] :=
    Block[{foundPos,
       piDigitBooleans = {#1[[1]],
           Length[#]} & /@ (OddQ /@
            RealDigits[N[Pi, checkDigits]][[1, 1 ;; All]] // Split)},
      foundPos = FirstPosition[piDigitBooleans, {True, n}][[1]];
      If[! NumericQ[foundPos],
       Return["Not found within " <> ToString[checkDigits] <> " digits"]];
       Total[piDigitBooleans[[1 ;; foundPos]][[All, 2]]] - n + 1]
    a239316[#] & /@ Range[1, 15] (* Julien Kluge, Jan 31 2016 *)
  • Python
    with open("pib.txt") as f:
        digits = f.read(1000000000)
        for a in range(1,30):
            found = False
            place = 0
            now = 0
            while place < 999999999:
                b = int(digits[place])
                c = int(digits[place+1])
                if b % 2 == 1:#digit is odd
                    now += 1
                else:
                    now = 0
                if now == a and c%2 == 0:
                    print(a,place-a+2)
                    found = True
                    break
                place += 1
            if not found:
                print("Not found in first billion digits.")
    # pib.txt is the first billion digits of pi, readily available online
    # David Consiglio, Jr., Sep 22 2014

Extensions

More terms from David Consiglio, Jr., Sep 22 2014

A153220 Self-locating strings within Pi: numbers n such that the string n is at position n (counting 3 and the decimal point) in decimal digits of Pi.

Original entry on oeis.org

4, 315, 360, 384, 47696, 496498, 1577526, 5607861220, 6106488294
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Comments

a(8) > 10^9. - Vaclav Kotesovec, Feb 18 2020

Examples

			a(1)=4 because the 4th character (including the decimal point) in 3.14159... is also a 4.
		

Crossrefs

Programs

  • Mathematica
    dpi = RealDigits[Pi, 10, 10000010][[1]]; Select[Range[2, 10000000], FromDigits[Take[dpi, {# - 1, # - 2 + IntegerLength[#]}]] == # &] (* Vaclav Kotesovec, Feb 18 2020 *)

Extensions

a(7) from Vaclav Kotesovec, Feb 18 2020
a(8)-a(9) from Guixin Lai, Aug 22 2025
Showing 1-10 of 21 results. Next