OFFSET
1,2
COMMENTS
The inverse permutation is A284459.
LINKS
FORMULA
PROG
(R)
maxrow <- 4 # by choice
a <- 1
b01 <- 1
for(m in 0:maxrow){
b01 <- c(b01, rep(1, 2^(m+1))); b01[(2^(m+1)+2^m-2^(m-1)):(2^(m+1)+2^m+2^(m-1)-1)] <- 0
for(k in 0:(2^m-1)){
a[2^(m+1) + k] <- a[2^m + k] + 2^(m + b01[2^(m+1) + k])
a[2^(m+1) + 2^m + k] <- a[2^m + k] + 2^(m + b01[2^(m+1) + 2^m + k])
}}
a
# Yosu Yurramendi, Mar 28 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Yosu Yurramendi, Mar 28 2017
STATUS
approved