OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 1255 because 255 occurs at offset 1255 after the decimal in the digits of Pi.
PROG
(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
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Gil Broussard, Dec 21 2008
EXTENSIONS
a(40) and beyond from Michael S. Branicky, Jan 30 2022
STATUS
approved