OFFSET
0,3
COMMENTS
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.
LINKS
FORMULA
PROG
(R)
maxn <- 63 # by choice
a <- c(1, 3, 2)
for(n in 2:maxn){
a[2*n+1] <- 2*a[n]
if(n%%2 == 0) a[2*n] <- 2*a[n+1] + 1
else a[2*n] <- 2*a[n-1] + 1
}
(a <- c(0, a))
# Yosu Yurramendi, Feb 23 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 17 2009
STATUS
approved