%I #2 Mar 30 2012 17:31:29
%S 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,
%T 31,24,25,26,27,37,36,39,38,33,32,35,34,45,44,47,46,41,40,43,42,53,52,
%U 55,54,49,48,51,50,61,60,63,62,57,56,59,58,70,71,68,69,66,67,64,65,78
%N a(n) = n XOR floor(Log_2(n)), where XOR is bitwise XOR.
%C This sequence is not a permutation of the integers which is self-inverse. But is it a permutation?
%t f[n_] := BitXor[n, Floor[ Log[2, n]]]; Array[f, 75];
%K easy,nonn
%O 1,2
%A _Robert G. Wilson v_, Jun 09 2010
|