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.

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