OFFSET
1,1
COMMENTS
Note that (except for 0 itself), numbers may not begin with 0. So that when we reach ...459045..., this contributes 90 to the sequence but not "04". - N. J. A. Sloane, Feb 08 2017
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
From Michael De Vlieger, Feb 09 2017: (Start)
Consider the decimal expansion of e=2.718281828459045235360...
The first 4 terms are 2,7,1,8 since these single digits appear in that order above. We do not encounter a different digit till we reach 4,5,9,0, thus these follow the first four in the sequence. We encounter 3 next, and finally 6 and have found all the single digits in the expansion.
a(11)=27 because we find the two-digit group "27" first, followed by a(12)=71, etc. until we exhaust the 90 possible two-digit groups that do not start with a zero.
a(101)=271 because we find the three-digit group "271" first, followed by a(102)=718, etc. until we exhaust the 900 possible 3-digit groups that do not have leading zeros, etc. (End)
MATHEMATICA
e = First@ RealDigits@ N[E, 10^6]; MapIndexed[10^(First@ #2 - 1) - 1 - Boole[First@ #2 == 1] + Flatten@ Values@ KeySort@ PositionIndex@ #1 &, Table[SequencePosition[e, 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
Bobby Jacobs, Feb 07 2017
EXTENSIONS
Edited by N. J. A. Sloane, Feb 08 2017
a(5), a(6), a(9), and a(10) inserted by Bobby Jacobs, Feb 09 2017
More terms from Michael De Vlieger, Feb 09 2017
STATUS
approved