login
Permutation of nonnegative integers: A059893-conjugate of A154435.
5

%I #13 Apr 09 2020 22:22:31

%S 0,1,3,2,5,6,7,4,13,10,11,12,9,14,15,8,21,26,27,20,25,22,23,24,29,18,

%T 19,28,17,30,31,16,53,42,43,52,41,54,55,40,45,50,51,44,49,46,47,48,37,

%U 58,59,36,57,38,39,56,61,34,35,60,33,62,63,32,85,106,107,84,105,86,87

%N Permutation of nonnegative integers: A059893-conjugate of A154435.

%C This permutation is induced by the same Lamplighter group generating wreath recursion (binary transducer) as A154435, starting from the active (swapping) state a, but in contrast to it, this one rewrites the bits from the least significant end up to the second most significant bit.

%H A. Karttunen, <a href="/A154437/b154437.txt">Table of n, a(n) for n = 0..2047</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F From _Yosu Yurramendi_, Feb 23 2020: (Start)

%F a(n) = A054429(A284459(n)) = A258996(A153154(n)) = A284459(A065190(n)).

%F a(1) = 1; for n > 0, a(2*n) = 2*a(A065190(n)) + 1, a(2*n+1) = 2*a(n). (End)

%o (R)

%o maxn <- 63 # by choice

%o a <- c(1,3,2)

%o for(n in 2:maxn){

%o a[2*n+1] <- 2*a[n]

%o if(n%%2 == 0) a[2*n] <- 2*a[n+1] + 1

%o else a[2*n] <- 2*a[n-1] + 1

%o }

%o (a <- c(0,a))

%o # _Yosu Yurramendi_, Feb 23 2020

%Y Inverse: A154438. a(n) = A059893(A154435(A059893(n))) = A054429(A153154(A054429(n))).

%K nonn,base

%O 0,3

%A _Antti Karttunen_, Jan 17 2009