|
|
A064810
|
|
Self-locating strings within Pi: numbers n such that the string n is at position n in the decimal digits of Pi, where 1 is the 0th digit.
|
|
5
|
|
|
6, 27, 13598, 43611, 24643510, 71683711, 78714901, 268561754, 4261759184, 82638677082, 548535559133, 8773143366618
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Near-misses '04658726522' and '0769960191236' occur at positions 4658726522 and 769960191236, respectively. - Kang Seonghoon, Nov 02 2020
|
|
LINKS
|
|
|
EXAMPLE
|
6 is the first term because Pi is 3.1415926... and the digit 6 is in position 6 after the decimal point when the first 1 after the decimal point is considered to be at position 0.
|
|
MATHEMATICA
|
Do[If[RealDigits[Pi, 10, a=i+IntegerLength@i-1, -2][[1, i;; a]]==IntegerDigits@i, Print@i], {i, 50000}] (* Giorgos Kalogeropoulos, Feb 21 2020 *)
|
|
PROG
|
(Python)
# download https://stuff.mit.edu/afs/sipb/contrib/pi/pi-billion.txt, then
with open('pi-billion.txt', 'r') as f: digits_of_pi = f.readline()[2:]
# from sympy import S, isprime
# digits_of_pi = str(S.Pi.n(3*10**5))[2:] # alternate to loading data
def afind():
global digits_of_pi
for k in range(len(digits_of_pi)):
s = str(k)
if digits_of_pi[k:k+len(s)] == s: print(k, end=", ")
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,more
|
|
AUTHOR
|
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 22 2001
|
|
EXTENSIONS
|
Error in a(11) reported by Sergey Prokudin, edited by Robert Price, Mar 14 2022
|
|
STATUS
|
approved
|
|
|
|