OFFSET
1,1
COMMENTS
Note that (except for 0 itself), numbers may not begin with 0. So that when we reach ...795028..., this contributes 50 to the sequence but not "02". - N. J. A. Sloane, Feb 08 2017
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Zak Seidov, Digits in the order that they appear the n-th time.
EXAMPLE
From Michael De Vlieger, Feb 09 2017: (Start)
Consider the decimal expansion of Pi=3.1415926535897932384626...
The first terms in the sequence are the 10 single digits in order of their appearance in the expansion above, thus, 3,1,4, skipping the second 1, then 5,9,2,6, then 8, then 7, followed by 0 (the 33rd digit in the expansion, ignoring the decimal point).
a(11)=31 because "31" is the first two-digit group found, followed by a(12)=14, etc. Once we have exhausted the 90 two-digit combinations, we search for three-digit combinations, the first being a(101)=314, etc. (End)
MATHEMATICA
p = First@ RealDigits@ N[Pi, 10^6]; MapIndexed[10^(First@ #2 - 1) - 1 - Boole[First@ #2 == 1] + Flatten@ Values@ KeySort@ PositionIndex@ #1 &, Table[SequencePosition[p, IntegerDigits@ k][[1, 1]], {n, 4}, {k, If[n == 1, 0, 10^(n - 1)], 10^n - 1}]] (* Michael De Vlieger, Feb 09 2017, Version 10.1 *)
CROSSREFS
KEYWORD
AUTHOR
Zak Seidov, Apr 29 2005
EXTENSIONS
Changed definition to make it into an infinite sequence. - N. J. A. Sloane, Feb 08 2017
STATUS
approved