login
A353827
Inverse permutation to A353826.
2
0, 1, 2, 3, 4, 8, 6, 7, 5, 9, 10, 20, 12, 13, 17, 24, 25, 23, 18, 19, 11, 21, 22, 26, 15, 16, 14, 27, 28, 56, 30, 31, 35, 60, 61, 59, 36, 37, 47, 39, 40, 44, 51, 52, 50, 72, 73, 65, 75, 76, 80, 69, 70, 68, 54, 55, 29, 57, 58, 62, 33, 34, 32, 63, 64, 74, 66, 67
OFFSET
0,3
EXAMPLE
A353826(11) = 20, so a(20) = 11.
PROG
(PARI) a(n) = { my (d=digits(n, 3), p=Mod(1, 3)); forstep (k=#d, 1, -1, if (d[k], p*=d[k]=lift(d[k]/p))); fromdigits(d, 3) }
CROSSREFS
Cf. A353826.
Sequence in context: A355858 A222247 A338242 * A353826 A123492 A123493
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, May 08 2022
STATUS
approved