login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A153221 Numbers k such that the string k is found at position k-3 in the decimal digits of Pi. 2

%I #11 Jan 30 2022 16:00:23

%S 51,875,62843,242424,4308765,9710721,24747689,126987778

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

%e a(1) = 51 because 51 occurs at offset (51-3) 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 ispal(s): return s == s[::-1]

%o def afind():

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

%o sk = str(k)

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

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

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

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

%K base,more,nonn

%O 1,1

%A _Gil Broussard_, Dec 21 2008

%E a(5)-a(8) from _Michael S. Branicky_, Jan 30 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)