login
Permutation of nonnegative integers: A059893-conjugate of A154436.
3

%I #13 May 16 2020 02:32:32

%S 0,1,3,2,7,4,5,6,15,12,9,10,11,8,13,14,31,28,25,26,19,16,21,22,23,20,

%T 17,18,27,24,29,30,63,60,57,58,51,48,53,54,39,36,33,34,43,40,45,46,47,

%U 44,41,42,35,32,37,38,55,52,49,50,59,56,61,62,127,124,121,122,115,112

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

%C This permutation is induced by the same Lamplighter group generating wreath recursion (binary transducer) as A154436, 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="/A154438/b154438.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 a(0) = 0, a(1) = 1, m > 0, 0 <= k < 2^m a(2^(m+2)-1-2*k) = 2*a(2^m+k),

%F a(2^(m+1)+2*k) = 2*a(2^m+k) + 1. - _Yosu Yurramendi_, Apr 10 2020

%o (R)

%o maxlevel <- 5 # by choice

%o a <- 1

%o for(m in 0:maxlevel) for(k in 0:(2^m-1)){

%o a[2^(m+2)-1-2*k] <- 2*a[2^m+k]

%o a[2^(m+1) +2*k] <- 2*a[2^m+k] + 1

%o }

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

%o # _Yosu Yurramendi_, Apr 10 2020

%Y Inverse: A154437.

%Y a(n) = A059893(A154436(A059893(n))) = A054429(A153153(A054429(n))).

%K nonn,base

%O 0,3

%A _Antti Karttunen_, Jan 17 2009