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.

A153221 Numbers k such that the string k is found at position k-3 in the decimal digits of Pi.

This page as a plain text file.
%I A153221 #11 Jan 30 2022 16:00:23
%S A153221 51,875,62843,242424,4308765,9710721,24747689,126987778
%N A153221 Numbers k such that the string k is found at position k-3 in the decimal digits of Pi.
%e A153221 a(1) = 51 because 51 occurs at offset (51-3) after the decimal in the digits of Pi.
%o A153221 (Python)
%o A153221 from sympy import S
%o A153221 # download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
%o A153221 #with open('pi-billion.txt', 'r') as f: pi_digits = f.readline()
%o A153221 pi_digits = str(S.Pi.n(3*10**5+2))[:-2] # alternative to above
%o A153221 pi_digits = pi_digits.replace(".", "")
%o A153221 def ispal(s): return s == s[::-1]
%o A153221 def afind():
%o A153221     for k in range(len(pi_digits)):
%o A153221         sk = str(k)
%o A153221         if sk == pi_digits[k-3:k-3+len(sk)]:
%o A153221             print(k, end=", ")
%o A153221 afind() # _Michael S. Branicky_, Jan 30 2022
%Y A153221 Cf. A057679, A057680, A109513, A109514, A153223, A153224.
%K A153221 base,more,nonn
%O A153221 1,1
%A A153221 _Gil Broussard_, Dec 21 2008
%E A153221 a(5)-a(8) from _Michael S. Branicky_, Jan 30 2022