OFFSET
0,3
COMMENTS
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.
LINKS
FORMULA
a(0) = 0, a(1) = 1, m > 0, 0 <= k < 2^m a(2^(m+2)-1-2*k) = 2*a(2^m+k),
a(2^(m+1)+2*k) = 2*a(2^m+k) + 1. - Yosu Yurramendi, Apr 10 2020
PROG
(R)
maxlevel <- 5 # by choice
a <- 1
for(m in 0:maxlevel) for(k in 0:(2^m-1)){
a[2^(m+2)-1-2*k] <- 2*a[2^m+k]
a[2^(m+1) +2*k] <- 2*a[2^m+k] + 1
}
(a <- c(0, a))
# Yosu Yurramendi, Apr 10 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 17 2009
STATUS
approved