login
A178754
a(n) = n XOR floor(Log_2(n)), where XOR is bitwise XOR.
0
1, 3, 2, 6, 7, 4, 5, 11, 10, 9, 8, 15, 14, 13, 12, 20, 21, 22, 23, 16, 17, 18, 19, 28, 29, 30, 31, 24, 25, 26, 27, 37, 36, 39, 38, 33, 32, 35, 34, 45, 44, 47, 46, 41, 40, 43, 42, 53, 52, 55, 54, 49, 48, 51, 50, 61, 60, 63, 62, 57, 56, 59, 58, 70, 71, 68, 69, 66, 67, 64, 65, 78
OFFSET
1,2
COMMENTS
This sequence is not a permutation of the integers which is self-inverse. But is it a permutation?
MATHEMATICA
f[n_] := BitXor[n, Floor[ Log[2, n]]]; Array[f, 75];
CROSSREFS
Sequence in context: A125764 A023897 A267100 * A276446 A100527 A276445
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Jun 09 2010
STATUS
approved