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 18 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

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

A117431 String n is at position n in decimal digits of golden ratio (phi).

Original entry on oeis.org

1, 20, 62, 9956
Offset: 1

Views

Author

Colin Rose, Mar 14 2006

Keywords

Comments

The next such number is greater than 10^7. Not only does number 20 occur at the 20th digit, but it occurs again as the 20th pair of digits (cf. A117432).

Examples

			1 is a term because the first digit in the golden ratio phi is 1. (phi = 1.6180339887498948482045 ...)
		

Crossrefs

Programs

  • Mathematica
    StringFinder[m_] := Module[{cc = 10^m + m, sol, aa}, sol = Partition[RealDigits[(1+Sqrt[5])/2, 10, cc] // First, m, 1]; Do[aa = FromDigits[sol[[i]]]; If[aa==i, Print[{i, aa}]], {i,Length[sol]}];] (* Example: StringFinder[2] produces all 2-digit members of the sequence. *)
  • Python
    from sympy import S
    def aupto(nn):
      phistr = str(S.GoldenRatio.n(nn+len(str(nn))+1)).replace(".", "")[:-1]
      for n in range(1, nn+1):
        nstr = str(n)
        if phistr[n-1:n-1+len(nstr)] == nstr: print(n, end=", ")
    aupto(10**5) # Michael S. Branicky, Jan 20 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
Showing 1-10 of 18 results. Next