|
|
A153225
|
|
Numbers k such that the string k modulo 100 is found at position k in the decimal digits of Pi.
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 189 because 89 occurs at offset 189 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%100)
if sk == pi_digits[k:k+len(sk)]:
yield k
g = agen()
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|