# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a252756 Showing 1-1 of 1 %I A252756 #10 Jan 15 2015 11:39:10 %S A252756 0,1,3,2,7,6,15,4,5,14,31,12,63,30,13,8,127,10,255,28,9,62,511,24,11, %T A252756 126,29,60,1023,26,2047,16,25,254,27,20,4095,510,61,56,8191,18,16383, %U A252756 124,17,1022,32767,48,23,22,21,252,65535,58,19,120,57,2046,131071,52,262143,4094,125,32,59,50,524287,508,49,54,1048575,40 %N A252756 Permutation of nonnegative integers: a(1) = 0, a(2) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A250470(2n+1)). %H A252756 Antti Karttunen, Table of n, a(n) for n = 1..1024 %H A252756 Index entries for sequences that are permutations of the natural numbers %F A252756 a(1) = 0, a(2) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A250470(2n+1)). %F A252756 As a composition of related permutations: %F A252756 a(n) = A054429(A252754(n)). %F A252756 a(n) = A243071(A250246(n)). %o A252756 (Scheme, with memoization-macro definec) %o A252756 (definec (A252756 n) (cond ((<= n 2) (- n 1)) ((even? n) (* 2 (A252756 (/ n 2)))) (else (+ 1 (* 2 (A252756 (A250470 n))))))) %Y A252756 Inverse: A252755. %Y A252756 Similar permutations: A243071, A252754, A054429, A250246. %Y A252756 Cf. also A250470, A253556 - A253559. %Y A252756 Differs from A243071 for the first time at n=21, where a(21) = 9, while A243071(21) = 29. %K A252756 nonn %O A252756 1,3 %A A252756 _Antti Karttunen_, Jan 02 2015 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE