OFFSET
0,3
COMMENTS
A self-inverse permutation of the nonnegative integers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10921
Joerg Arndt, Matters Computational (The Fxtbook), pages 61-62.
Rémy Sigrist, PARI program
Wikipedia, Non-adjacent form
EXAMPLE
For n = 22: the nonadjacent form for 22 is "10T0T0" (where T denotes -1), reversing the digits and leaving any trailing zeros alone yields "T0T010", so a(22) = |- 2^5 - 2^3 + 2^1| = 38.
PROG
(PARI) \\ See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 28 2024
STATUS
approved