This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A117303 #19 Jul 14 2022 09:08:06 %S A117303 1,3,2,5,4,6,8,7,16,12,32,10,64,24,128,9,256,48,512,20,1024,96,2048, %T A117303 14,4096,192,8192,40,16384,384,32768,11,65536,768,131072,80,262144, %U A117303 1536,524288,28,1048576,3072,2097152,160,4194304,6144,8388608,18,16777216 %N A117303 Self-inverse permutation of the natural numbers based on the bijection (2*x-1)*2^(y-1) <--> (2*y-1)*2^(x-1). %C A117303 a(a(n)) = n; fixed points A014480: a(A014480(n)) = A014480(n). - _Reinhard Zumkeller_, Apr 27 2006 %H A117303 Alois P. Heinz, <a href="/A117303/b117303.txt">Table of n, a(n) for n = 1..6644</a> %H A117303 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A117303 a(n) = (2*A001511(n) - 1) * 2^(A003602(n) - 1). %p A117303 a:= n-> (j-> (2*j+1)*2^((n/2^j-1)/2))(padic[ordp](n, 2)): %p A117303 seq(a(n), n=1..50); # _Alois P. Heinz_, Jan 23 2019 %t A117303 a[n_] := (2 IntegerExponent[2 n, 2] - 1)*2^((n/2^IntegerExponent[n, 2] + 1)/2 - 1); Array[a, 50] (* _Jean-François Alcover_, Mar 12 2019 *) %o A117303 (Python) %o A117303 def A117303(n): return (((m:=(n&-n).bit_length())<<1)-1)*(1<<(n>>m)) # _Chai Wah Wu_, Jul 14 2022 %Y A117303 Cf. A000265, A007814, A006519, A005408, A000079. %Y A117303 Cf. A118413, A118416. %K A117303 nonn %O A117303 1,2 %A A117303 _Reinhard Zumkeller_, Apr 24 2006 %E A117303 Spelling corrected by _Jason G. Wurtzel_, Aug 23 2010