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 12 results. Next

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

Original entry on oeis.org

1, 16470, 44899, 79873884, 711939213, 36541622473, 45677255610, 62644957128, 656430109694
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)
Consequently, with the second Borel-Cantelli lemma, the expected number of terms in this sequence is infinite with probability 1. (Of course the sequence is not random, but almost all of the sequences corresponding to randomly-chosen real numbers in place of Pi have infinitely many terms.) - Charles R Greathouse IV, Apr 29 2013
a(1) & a(5) are the first occurrences in Pi of their respective strings; a(2) & a(4) are the second occurrences; a(3) is the fourth occurrence. - Hans Havermann, Jul 27 2014
A near-miss '043611' occurs at position 43611. - S. Alwin Mao, Feb 18 2020
a(10) > 5 * 10^13. - Kang Seonghoon, Nov 02 2020
Has no terms in common with A037008 (but see Mao comment above). - Charles R Greathouse IV, Jun 21 2022

Examples

			1 is a term because the string of digits '1' occurs as the 1st digit after the decimal point.
Similarly, 16470 is a term because the string of digits '16470' occurs starting at position 16470 (after the decimal point) in the digits of Pi (although it already occurs earlier at position 1602). - _M. F. Hasler_, Jul 29 2024
		

References

  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 60.

Crossrefs

Cf. A000796 (decimal digits of Pi), A057679 (variant where position 1 refers to the initial digit 3), A064810 (variant where position 0 refers to the first digit after the decimal point), A109513 (variant using chunks of m digits).

Programs

  • Mathematica
    StringsinPiAfterPoint[m_] := Module[{cc = 10^m + m, sol, aa}, sol = Partition[RealDigits[Pi,10,cc] // First // Rest, m, 1]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i,Length[sol]}];] (* For example, StringsinPiAfterPoint[5] returns all 5-digit members of the sequence. - Colin Rose, Mar 15 2006 *)
    Do[If[RealDigits[Pi,10,a=i+IntegerLength@i-1,-1][[1,i;;a]]==IntegerDigits@i,Print@i],{i,50000}] (* Giorgos Kalogeropoulos, Feb 21 2020 *)
  • PARI
    A057680_row(r=5)={my(M=10^r, R=[]); for(n=M\10, M-1, localprec(n+r); Pi\10^(1-r-n)%M==n && !print1(n",") && R=concat(R,n));R} \\ prints & returns the r-digit terms. - M. F. Hasler, Jul 29 2024

Extensions

More terms from Colin Rose, Mar 15 2006
a(5) from Nathaniel Johnston, Nov 12 2010
a(6)-a(8) from Alan Eliasen, May 01 2013
a(9) from Alan Eliasen, Jun 06 2013
Name clarified by Kang Seonghoon, Nov 02 2020
Edited by M. F. Hasler, Jul 29 2024

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

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

A117432 Let n be an integer consisting of m digits. Then n is a Phithy number if the n-th m-tuple in the decimal digits of golden ratio phi is string n.

Original entry on oeis.org

1, 20, 63, 104, 7499430, 9228401
Offset: 0

Views

Author

Colin Rose, Mar 14 2006

Keywords

Examples

			1 is a term because the first single digit in golden ratio phi is 1.
Number 20 is a term because the 20th pair of digits in phi is 20.
(cf. phi = 1.6180339887498948482045868343656381177203...)
		

Crossrefs

Programs

  • Mathematica
    PhithyNumbers[m_] := Module[{cc = m(10^m)+m, sol, aa}, sol = Partition[RealDigits[GoldenRatio, 10, cc] // First, m]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i,Length[sol]}];] Example: PhithyNumbers[3] produces all 3-digit Phithy numbers
  • Python
    from sympy import S
    def aupto(nn):
      mm = len(str(nn))
      phistr = str(S.GoldenRatio.n(nn*mm+1)).replace(".", "")[:-1]
      for n in range(1, nn+1):
        nstr = str(n)
        m = len(nstr)
        if phistr[(n-1)*m:n*m] == nstr: print(n, end=", ")
    aupto(10**5) # Michael S. Branicky, Jan 20 2021

Extensions

a(4)-a(5) from Michael S. Branicky, Jan 21 2021

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

A153225 Numbers k such that the string k modulo 100 is found at position k in the decimal digits of Pi.

Original entry on oeis.org

1, 102, 104, 189, 193, 256, 302, 407, 467, 475, 503, 594, 702, 712, 751, 804, 881, 905, 978, 998, 1005, 1053, 1104, 1107, 1154, 1275, 1303, 1306, 1307, 1315, 1421, 1502, 1600, 1604, 1690, 1694, 1706, 1802, 1860, 1904, 1907, 1908, 2006, 2025, 2105, 2146, 2208
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(4) = 189 because 89 occurs at offset 189 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 agen():
        for k in range(len(pi_digits)):
            sk = str(k%100)
            if sk == pi_digits[k:k+len(sk)]:
                yield k
    g = agen()
    print([next(g) for n in range(1, 48)]) # Michael S. Branicky, Jan 30 2022

Extensions

a(47) and beyond from Michael S. Branicky, Jan 30 2022

A153226 Numbers k such that the string k modulo 1000 is found at position k in the decimal digits of Pi.

Original entry on oeis.org

1, 1005, 1053, 1255, 2006, 2025, 2246, 2560, 3712, 4063, 4066, 4087, 5006, 5009, 5038, 5068, 5076, 5538, 6000, 6025, 6045, 7007, 7025, 7037, 8068, 8960, 9009, 9052, 10007, 10823, 11003, 11005, 12000, 12003, 12134, 12639, 14009, 14207, 14326, 14944, 15052, 16000
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(4) = 1255 because 255 occurs at offset 1255 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 agen():
        for k in range(len(pi_digits)):
            sk = str(k%1000)
            if sk == pi_digits[k:k+len(sk)]:
                yield k
    g = agen()
    print([next(g) for n in range(1, 43)]) # Michael S. Branicky, Jan 30 2022

Extensions

a(40) and beyond from Michael S. Branicky, Jan 30 2022

A153227 Numbers k such that the string k is found at position 2k in the decimal digits of Pi.

Original entry on oeis.org

5, 95, 171, 529, 1913, 2753, 60597, 831092, 9552919
Offset: 1

Views

Author

Gil Broussard, Dec 21 2008

Keywords

Examples

			a(2) = 95 because 95 occurs at offset 190 (2*95) 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(1, len(pi_digits)):
            sk = str(k)
            if sk == pi_digits[2*k:2*k+len(sk)]:
                print(k, end=", ")
    afind() # Michael S. Branicky, Jan 30 2022

Extensions

a(8) corrected by Paul Tek, Jun 09 2013
a(9) from Michael S. Branicky, Jan 30 2022
Showing 1-10 of 12 results. Next