OFFSET
1,2
COMMENTS
The digits at position 1667 are "334", so according to the strict definition of this sequence, a(33) is 1667 and a(34) is 1668. However, this would not enable a person to mark in bold-face the counting numbers within the digits of pi, which was the inspiration for this sequence. Surprisingly, if overlapping is not allowed, this changes only one element of the sequence. a(34) becomes 1700 and a(35) remains 1719. No other overlapping occurs within the first 100,000 decimal digits of Pi. - Graeme McRae, Mar 20 2005
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..9999
Dave Andersen, The Pi-Search Page.
Bob Happelberg, Bob's Poetry Page for Feb 2005
EXAMPLE
Moving always to the right in the decimal expansion of Pi, the string "1" is found at position 1 counting from the first digit after the decimal point, the string "2" is found at position 6, the string "3" at position 6, the string "4" at position 19, etc.
MATHEMATICA
p = ToString[ FromDigits[ RealDigits[ N[Pi - 3, 2600]][[1]]]]; lst = {0}; Do[a = StringPosition[p, ToString[n], 1][[1, 1]]; AppendTo[lst, a + lst[[ -1]]]; p = StringDrop[p, a], {n, 49}]; Rest[lst] (* Robert G. Wilson v, Mar 19 2005 *)
PROG
(Magma) k := 3000; R := RealField(k); S := IntegerToString(Round(10^k*(-3 + Pi(R)))); Q := []; d := 0; for n in [1..49] do p:= Position(S, IntegerToString(n)); d+:=p; Append(~Q, d); S := Substring(S, p+1, #S-p); end for; Q; /* Klaus Brockhaus, Feb 15 2007 */
(PARI) lista(nn, t=10^5) = {default(realprecision, t); my(d, k, v=digits(floor(Pi*10^t))); for(n=1, nn, d=digits(n); until(v[k+1..k+#d]==d, k++); print1(k, ", ")); } \\ Jinyuan Wang, Feb 18 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Suggested by Bob's Poetry Page. - Alonso del Arte, Mar 01 2005
EXTENSIONS
More terms from Graeme McRae and Robert G. Wilson v, Mar 19 2005
STATUS
approved