login
A351870
a(n) is the least k such that A351868(k) = n.
2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11111111111, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 112, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 1113, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 224, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 111115, 56, 57, 58, 59, 60, 61, 62
OFFSET
0,3
FORMULA
a(n) <= A002275(n).
EXAMPLE
For n = 44:
- the number 44 could encode 1 or 2 runs of consecutive equal digits,
- for 1 run, we have the following possibilities:
11111111111111111111111111111111111111111111 (44 1's)
2222222222222222222222 (22 2's)
44444444444 (11 4's)
- for 2 runs, we have the following possibilities:
11114 (4 1's and then 1 4's)
224 (2 2's and then 1 4's)
111122 (4 1's and then 2 2's)
422 (1 4's and then 2 2's)
221111 (2 2's and then 4 1's)
41111 (1 4's and then 4 1's)
- the least possibility is 224,
- so a(44) = 224.
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A004916 A120126 A062399 * A121603 A261333 A330430
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 22 2022
STATUS
approved