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

%I #10 Jan 30 2022 15:59:56

%S 26,32,41,86,2799,469113068

%N Numbers k such that the string k is found at position k-5 in the decimal digits of Pi.

%e a(1) = 26 because 26 occurs at offset (26-5) after the decimal in the digits of Pi.

%o (Python)

%o from sympy import S

%o # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then

%o #with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()

%o pi_digits = str(S.Pi.n(3*10**5+2))[:-2] # alternative to above

%o pi_digits = pi_digits.replace(".", "")

%o def afind():

%o for k in range(6, len(pi_digits)):

%o sk = str(k)

%o if sk == pi_digits[k-5:k-5+len(sk)]:

%o print(k, end=", ")

%o afind() # _Michael S. Branicky_, Jan 30 2022

%Y Cf. A057679, A057680, A109513, A109514, A153221, A153223.

%K base,more,nonn

%O 1,1

%A _Gil Broussard_, Dec 21 2008

%E a(6) from _Michael S. Branicky_, Jan 30 2022