login
A333777
Inverse permutation to A333776.
4
0, 1, 2, 3, 4, 6, 5, 7, 8, 12, 10, 13, 9, 14, 11, 15, 16, 24, 20, 25, 18, 26, 21, 27, 17, 28, 22, 30, 19, 29, 23, 31, 32, 48, 40, 49, 36, 50, 41, 51, 34, 52, 42, 54, 37, 53, 43, 55, 33, 56, 44, 60, 38, 58, 46, 61, 35, 57, 45, 62, 39, 59, 47, 63, 64, 96, 80, 97
OFFSET
0,3
EXAMPLE
A333776(90) = 106, hence a(106) = 96.
PROG
(PARI) a(n, base=2) = { my (d=Vecrev(digits(n, base)), v=0); forstep (k=#d, 1, -1, v += d[k]*base^(k-1); if (d[k], d=Vecrev(d[1..k-1]))); v }
CROSSREFS
Cf. A333776.
Sequence in context: A372128 A367307 A139706 * A306869 A139708 A333776
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Apr 05 2020
STATUS
approved