login
A332144
Nonnegative numbers ordered by number of digits, and then by sum of digits, and then by value.
2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 12, 21, 30, 13, 22, 31, 40, 14, 23, 32, 41, 50, 15, 24, 33, 42, 51, 60, 16, 25, 34, 43, 52, 61, 70, 17, 26, 35, 44, 53, 62, 71, 80, 18, 27, 36, 45, 54, 63, 72, 81, 90, 19, 28, 37, 46, 55, 64, 73, 82, 91, 29, 38, 47, 56
OFFSET
0,3
COMMENTS
This sequence is a permutation of the nonnegative integers with inverse A332166.
This sequence can also be seen as an irregular triangle with first row consisting of a zero, and subsequent row lengths given by A289410.
FORMULA
a(10^k - 1) = 10^k - 1 for any k >= 0.
a(10^k) = 10^k for any k >= 0.
a(10^k + 1) = 10^k + 1 for any k >= 0.
EXAMPLE
Triangle starts:
0;
1;
2;
3;
4;
5;
6;
7;
8;
9;
10;
11, 20;
12, 21, 30;
13, 22, 31, 40;
14, 23, 32, 41, 50;
15, 24, 33, 42, 51, 60;
16, 25, 34, 43, 52, 61, 70;
17, 26, 35, 44, 53, 62, 71, 80;
18, 27, 36, 45, 54, 63, 72, 81, 90;
19, 28, 37, 46, 55, 64, 73, 82, 91;
29, 38, 47, 56, 65, 74, 83, 92;
39, 48, 57, 66, 75, 84, 93;
49, 58, 67, 76, 85, 94;
59, 68, 77, 86, 95;
69, 78, 87, 96;
79, 88, 97;
89, 98;
99;
...
PROG
(PARI) See Links section.
CROSSREFS
Cf. A187769 (binary analog), A289410, A332166 (inverse).
Sequence in context: A239217 A130571 A275512 * A339018 A303948 A275413
KEYWORD
nonn,base,tabf
AUTHOR
Rémy Sigrist, Nov 20 2020
STATUS
approved