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 A234027 #11 Jun 05 2017 17:36:38 %S A234027 0,1,3,2,4,5,7,6,15,14,12,13,10,11,9,8,22,23,21,20,19,18,16,17,25,24, %T A234027 26,27,28,29,31,30,53,52,54,55,48,49,51,50,58,59,57,56,63,62,60,61,36, %U A234027 37,39,38,33,32,34,35,43,42,40,41,46,47,45,44,64,65,67,66 %N A234027 Self-inverse permutation of nonnegative integers, A054429-conjugate of blue code: a(n) = A054429(A193231(A054429(n))). %H A234027 Antti Karttunen, <a href="/A234027/b234027.txt">Table of n, a(n) for n = 0..8191</a> %H A234027 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A234027 a(n) = A054429(A193231(A054429(n))). %F A234027 a(n) = A234025(A054429(n)). %F A234027 a(n) = A054429(A234026(n)). %F A234027 a(n) = A059894(A234024(A059894(n))). %o A234027 (Scheme) (define (A234027 n) (A054429 (A193231 (A054429 n)))) %o A234027 (Python) %o A234027 def a065621(n): return n^(2*(n - (n&-n))) %o A234027 def a048724(n): return n^(2*n) %o A234027 def a054429(n): return 1 if n==1 else 2*a054429(int(n/2)) + 1 - n%2 %o A234027 def a193231(n): %o A234027 if n<2: return n %o A234027 if n%2==0: return a048724(a193231(n/2)) %o A234027 else: return a065621(1 + a193231((n - 1)/2)) %o A234027 def a(n): return n if n<2 else a054429(a193231(a054429(n))) # _Indranil Ghosh_, Jun 05 2017 %Y A234027 Cf. A054429, A059894, A193231, A234024-A234026. %K A234027 nonn %O A234027 0,3 %A A234027 _Antti Karttunen_, Dec 28 2013