%I #26 Apr 17 2017 13:10:59
%S 33,2,7,1,3,5,8,14,12,6,50,95,149,111,2,4,41,96,425,38,54,94,136,17,
%T 293,90,7,29,34,187,65,1,16,25,87,10,286,47,18,44,71,3,93,24,60,61,20,
%U 120,88,58,32,49,173,9,192,131,211,405,11,5,128,220,21,313,23,8,118,99,606
%N Number the digits of the decimal expansion of Pi: 3 is the first, 1 is the second, 4 is the third and so on; a(n) gives the starting position of the first occurrence of n.
%C 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
%H T. D. Noe, <a href="/A032445/b032445.txt">Table of n, a(n) for n=0..9999</a>
%H M. J. Halm, <a href="http://michaelhalm.tripod.com/id171.htm">More Sequences</a>, Mpossibilities 83, April 2003.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ConstantDigitScanning.html">Constant Digit Scanning</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PiDigits.html">Pi Digits</a>
%F a(n) = A176341(n)+1. - _M. F. Hasler_, Nov 16 2013
%e a(10) = 50 because the first "10" in the decimal expansion of Pi occurs at digits 50 and 51: 31415926535897932384626433832795028841971693993751058209749445923...
%t p = ToString[FromDigits[RealDigits[N[Pi, 10^4]][[1]]]]; Do[Print[StringPosition[p, ToString[n]][[1]][[1]]], {n, 1, 100}]
%t 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 *)
%o (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
%Y Cf. A000796 (decimal expansion of Pi).
%Y Cf. A080597 (terms from the decimal expansion of Pi which include every combination of n digits as consecutive subsequences).
%Y Cf. A032510 (last string seen when scanning the decimal expansion of Pi until all n-digit strings have been seen).
%Y Cf. A064467 (primes in Pi).
%K nonn,base,easy,nice
%O 0,1
%A _Jeff Burch_, Paul Simon (paulsimn(AT)microtec.net)
%E More terms from _Simon Plouffe_. Corrected by Michael Esposito and Michelle Vella (michael_esposito(AT)oz.sas.com).
%E More terms from _Robert G. Wilson v_, Oct 04 2001