|
|
A327689
|
|
Lexicographically earliest sequence of distinct positive terms such that for any k > 0, the sum of the first k digits does not exceed k.
|
|
1
|
|
|
1, 10, 2, 11, 100, 3, 101, 12, 102, 110, 20, 21, 111, 1000, 4, 1001, 13, 1002, 103, 1003, 1010, 22, 1011, 112, 1012, 1020, 120, 121, 1021, 1100, 30, 200, 31, 1101, 201, 202, 1102, 1110, 210, 211, 1111, 10000, 5, 10001, 14, 10002, 104, 10003, 1004, 10004, 10010
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The sequence is a permutation of the natural numbers:
- we can always extend the sequence with a power of 10 that has not yet appeared,
- every power of 10 appears in the sequence,
- for any n > 0 with digital sum s: n can appear after any number of the form 10^k with k+1 >= s, hence n will eventually appear.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
The first terms, alongside the corresponding digits and sum of digits, are:
n a(n) k d(k) s(k)
-- ---- -- ---- ----
1 1 1 1 1
2 10 2 1 2
3 0 2
3 2 4 2 4
4 11 5 1 5
6 1 6
5 100 7 1 7
8 0 7
9 0 7
6 3 10 3 10
|
|
PROG
|
(PARI) See Links section.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|