login
A336207
Lexicographically earliest sequence of nonnegative terms such that whenever a(k_1) = ... = a(k_m) with k_1 < ... < k_m, the sum k_1 + ... + k_m can be computed without carries in factorial base.
1
0, 0, 1, 2, 3, 0, 2, 0, 4, 5, 6, 1, 5, 4, 7, 8, 9, 3, 10, 11, 12, 13, 14, 0, 8, 1, 11, 10, 15, 0, 16, 7, 17, 16, 18, 2, 19, 17, 20, 21, 22, 15, 23, 24, 25, 26, 27, 0, 13, 12, 24, 19, 28, 1, 21, 20, 29, 30, 31, 6, 30, 29, 32, 33, 34, 28, 35, 36, 37, 38, 39, 2
OFFSET
1,4
FORMULA
a(n) = 0 iff n belongs to A279732.
EXAMPLE
In factorial base:
- 1 = "1", 2 = "10", 3 = "11", 4 = "20",
- we can add without carry 1 and 2, so a(1) = a(2) = 0,
- 1 + 2 + 3 implies a carry, so a(3) = 1,
- 1 + 2 + 4 and 3 + 4 imply a carry, so a(4) = 2.
PROG
(C) See Links section.
CROSSREFS
See A279125 and A336206 for similar sequences.
Cf. A279732.
Sequence in context: A352938 A065861 A329393 * A344909 A126832 A068908
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Jul 12 2020
STATUS
approved