OFFSET
0,1
COMMENTS
See A176341 for a variant counting positions starting with 0, and A232013 for a sequence based on iterations of A176341. - M. F. Hasler, Nov 16 2013
LINKS
T. D. Noe, Table of n, a(n) for n=0..9999
M. J. Halm, More Sequences, Mpossibilities 83, April 2003.
Eric Weisstein's World of Mathematics, Constant Digit Scanning
Eric Weisstein's World of Mathematics, Pi Digits
FORMULA
a(n) = A176341(n)+1. - M. F. Hasler, Nov 16 2013
EXAMPLE
a(10) = 50 because the first "10" in the decimal expansion of Pi occurs at digits 50 and 51: 31415926535897932384626433832795028841971693993751058209749445923...
MATHEMATICA
p = ToString[FromDigits[RealDigits[N[Pi, 10^4]][[1]]]]; Do[Print[StringPosition[p, ToString[n]][[1]][[1]]], {n, 1, 100}]
With[{pi=RealDigits[Pi, 10, 1000][[1]]}, Transpose[Flatten[Table[ SequencePosition[ pi, IntegerDigits[n], 1], {n, 0, 70}], 1]][[1]]] (* The program uses the SequencePosition function from Mathematica version 10 *) (* Harvey P. Dale, Dec 01 2015 *)
PROG
(PARI) A032445(n)=my(L=#Str(n)); n=Mod(n, 10^L); for(k=L-1, 9e9, Pi\.1^k-n||return(k+2-L)) \\ Make sure to use sufficient realprecision, e.g. via \p999. - M. F. Hasler, Nov 16 2013
CROSSREFS
Cf. A000796 (decimal expansion of Pi).
Cf. A080597 (terms from the decimal expansion of Pi which include every combination of n digits as consecutive subsequences).
Cf. A032510 (last string seen when scanning the decimal expansion of Pi until all n-digit strings have been seen).
Cf. A064467 (primes in Pi).
KEYWORD
nonn,base,easy,nice
AUTHOR
Jeff Burch, Paul Simon (paulsimn(AT)microtec.net)
EXTENSIONS
More terms from Simon Plouffe. Corrected by Michael Esposito and Michelle Vella (michael_esposito(AT)oz.sas.com).
More terms from Robert G. Wilson v, Oct 04 2001
STATUS
approved