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

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

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

A331015 Self-locating strings within Euler-Mascheroni Constant (gamma), strings k at position k (taking gamma offset 1).

Original entry on oeis.org

57, 16939, 767158, 5505709, 6674196, 7418985, 18873720
Offset: 1

Views

Author

S. Alwin Mao, Feb 12 2020

Keywords

Comments

The first self-locating digits of gamma are 57, and the first digits of gamma are 57.
A near-miss '04305165' begins at position 4305165.

Examples

			57 is a term because the 57th digit is 5 and the 58th digit is 7.
		

Crossrefs

Euler-Mascheroni constant digits: A001620.
Self-locating digits of Pi: A057679, A064810 and e: A205648.

Programs

  • Mathematica
    dgamma = RealDigits[EulerGamma, 10, 1000010][[1]]; Select[Range[1000000], FromDigits[Take[dgamma, {#, # - 1 + IntegerLength[#]}]] == # &] (* Vaclav Kotesovec, Feb 18 2020 *)

A334259 Self-locating numbers within the Copeland-Erdős constant: numbers k such that the string k is at the 0-indexed position k in the decimal digits of the concatenation of the prime numbers as a decimal sequence.

Original entry on oeis.org

37, 3790, 4991, 38073, 908979, 8378611, 62110713, 87126031, 8490820681, 9514920697, 24717215429, 784191725098, 836390891918
Offset: 1

Views

Author

Soren Telfer, Apr 20 2020

Keywords

Comments

This is inspired by the self-locating digits in Pi (A057680). Similar to A064810, these digits are 0-indexed, whereas in A057680 the sequence is 1-indexed.
The first two terms of the 1-indexed sequence are 8031711 and 648967141. - Giovanni Resta, Apr 22 2020

Examples

			37 is a term because the 3 digit of 37 appears in the 37th 0-indexed position of the Copeland-Erdős constant.
		

Crossrefs

Programs

  • Mathematica
    q=23; p=3; dq=2; dn=dp=1; L={}; n=-1; pP=nP=10; While[++n < 10^6, If[n == nP, nP *= 10; dn++]; While[ q pP, pP *= 10; dp++]; q = q pP + p; dq += dp]; If[n == Floor[ q/10^(dq - dn)], Print@ AppendTo[L, n]]; q = Mod[q, 10^(--dq)]]; L (* Giovanni Resta, Apr 21 2020 *)
  • Python
    import sympy
    from sympy import sieve
    def digits_at(ss, n):
        ''' Extracts len(str(n)) digits at position n.'''
        t = len(str(n))
        s = ss[n:n+t]
        if s == '':
            return -1
        return int(s)
    def self_locating(ss, n):
        return digits_at(ss,n) == n
    SS = ""
    for p in sieve.primerange(2, 100000):
        SS += str(p)
    for i in range(100000):
        if self_locating(SS, i):
            print(i,end=",")

Extensions

a(3)-a(13) from Giovanni Resta, Apr 22 2020

A358211 Self-locating strings within e: numbers k such that the string k is at position k (after the decimal point) in the decimal digits of e, where 7 is the 0th digit.

Original entry on oeis.org

1, 8, 215, 374, 614, 849, 4142, 7945, 5964055, 8008913, 7131377227, 8829981707
Offset: 0

Views

Author

Chris Baumann, Nov 04 2022

Keywords

Examples

			The first two terms 1 and 8 are depicted here:
Position:      0123456789...
Digits of e: 2.7182818284...
               .^......^....
1 is the first term because 1 is in position 1 after the decimal point (when starting to count with 0).
8 is the second term because 8 is in position 8 etc.
		

Crossrefs

Programs

  • Python
    # after Michael S. Branicky in A064810
    # First get a file with e digits, e.g. https://www4.baumann.at/downloads/e.txt
    with open('e.txt', 'r') as f: digits_of_e = f.readline()[2:]
    def afind():
      global digits_of_e
      for k in range(len(digits_of_e)):
        s = str(k)
        if digits_of_e[k:k+len(s)] == s: print(k, end=", ")
    afind()

Extensions

a(9)-a(12) from Michael S. Branicky, Nov 04 2022
Showing 1-5 of 5 results.