|
|
A344531
|
|
a(n) = Sum_{k >= 0} b_k * 2^A061579(k) for any number n with binary expansion Sum_{k >= 0} b_k * 2^k.
|
|
3
|
|
|
0, 1, 4, 5, 2, 3, 6, 7, 32, 33, 36, 37, 34, 35, 38, 39, 16, 17, 20, 21, 18, 19, 22, 23, 48, 49, 52, 53, 50, 51, 54, 55, 8, 9, 12, 13, 10, 11, 14, 15, 40, 41, 44, 45, 42, 43, 46, 47, 24, 25, 28, 29, 26, 27, 30, 31, 56, 57, 60, 61, 58, 59, 62, 63, 512, 513, 516
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
This sequence is a self-inverse permutation of the nonnegative integers.
Fixed points correspond to A261195.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n = 42:
- 42 = 2^1 + 2^3 + 2^5,
- so a(42) = 2^2 + 2^5 + 2^3 = 44.
|
|
PROG
|
(PARI) a(n) = { my (v=0, e, t=0, w=1); while (n, n-=2^e=valuation(n, 2); while (e>t+w-1, t+=w; w++); v+=2^(2*t+w-1-e)); v }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|