OFFSET
0,1
COMMENTS
It is unknown whether Pi is a normal number. If it is (at least in base 10) then this sequence is well defined.
The numbers a(n) refer to the position of the initial digit of n in the decimal expansion of Pi, where "3" is at position a(3)=0, "1" is at position a(1)=1, etc. This is also the numbering scheme used on the "Pi search page" cited among the LINKS. See A232013 for a sequence based on iterations of this one. See A032445 for a variant of the present sequence, where numbering starts at one. - M. F. Hasler, Nov 16 2013
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Dave Andersen, Search within first 200,000,000 digits of pi
Michael D. Huberty, Ko Hayashi & Chia Vang, First 100,000 digits of pi
Simon Plouffe, First 50,000,000 digits of pi
FORMULA
a(n) = A032445(n)-1. - M. F. Hasler, Nov 16 2013
MATHEMATICA
p=ToString[FromDigits[RealDigits[N[Pi, 10^4]][[1]]]]; Do[Print[StringPosition[p, ToString[n]][[1]][[1]] - 1], {n, 0, 100}] (* Vincenzo Librandi, Apr 17 2017 *)
With[{pid=RealDigits[Pi, 10, 800][[1]]}, Flatten[Table[ SequencePosition[ pid, IntegerDigits[n], 1], {n, 0, 70}], 1]][[All, 1]]-1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 27 2019 *)
PROG
(Python)
pi = "314159265358979323846264338327950288419716939937510582097494459230..."
[ pi.find(str(i)) for i in range(10000) ]
(PARI) A176341(n)=my(L=#Str(n)); n=Mod(n, 10^L); for(k=L-1, 9e9, Pi\.1^k-n||return(k+1-L)) \\ Make sure to use sufficient realprecision, e.g. via \p999. - M. F. Hasler, Nov 16 2013
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Daniel E. Loeb, Apr 15 2010
STATUS
approved