|
|
A153223
|
|
Numbers k such that the string k is found at position k-4 in the decimal digits of Pi.
|
|
2
|
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = 9 because 9 occurs at offset (9-4) 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 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=", ")
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,more,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|