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 A269378 #7 Mar 07 2016 12:24:07 %S A269378 0,1,2,3,6,5,4,7,8,13,10,11,16,9,32,15,14,17,12,27,64,21,26,23,128,33, %T A269378 24,19,22,65,256,31,512,29,18,35,1024,25,20,55,30,129,2048,43,48,53, %U A269378 34,47,4096,257,8192,67,54,49,96,39,40,45,42,131,28,513,16384,63,46,1025,32768,59,65536,37,66,71,131072,2049,262144,51,38,41 %N A269378 Permutation of natural numbers: a(1) = 0, after which a(2n) = 1 + 2*a(n), a(2n+1) = 2 * a(A269370(n)). %C A269378 Note the indexing: Domain starts from 1, range from 0. %H A269378 Antti Karttunen, <a href="/A269378/b269378.txt">Table of n, a(n) for n = 1..1024</a> %H A269378 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A269378 a(1) = 0, after which, a(2n) = 1 + 2*a(n), a(2n+1) = 2 * a(A269370(n)). %F A269378 As a composition of related permutations: %F A269378 a(n) = A269388(A260741(n)). %o A269378 (Scheme, with memoization-macro definec) %o A269378 (definec (A269378 n) (cond ((= 1 n) (- n 1)) ((even? n) (+ 1 (* 2 (A269378 (/ n 2))))) (else (* 2 (A269378 (A269370 n)))))) %Y A269378 Inverse: A269377. %Y A269378 Cf. A269370. %Y A269378 Related permutation: A269376. %Y A269378 Cf. also A252754, A269388. %K A269378 nonn %O A269378 1,3 %A A269378 _Antti Karttunen_, Mar 01 2016