login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A180199
a(n) = A180201(A180201(n)).
4
0, 1, 2, 3, 4, 5, 6, 7, 9, 8, 11, 10, 12, 13, 14, 15, 19, 18, 17, 16, 22, 23, 20, 21, 25, 24, 27, 26, 28, 29, 30, 31, 39, 38, 37, 36, 34, 35, 32, 33, 45, 44, 47, 46, 40, 41, 42, 43, 51, 50, 49, 48, 54, 55, 52, 53, 57, 56, 59, 58, 60, 61, 62, 63, 79, 78, 77, 76, 74, 75, 72, 73, 69
OFFSET
0,3
COMMENTS
Permutation of the natural numbers with inverse A180198;
a(A180200(n)) = A180200(a(n)) = A180201(n);
a(A075427(n)) = A075427(n).
PROG
(R)
nmax <- 31 # by choice
a <- 1:3
for(n in 1:nmax) for(k in 0:3){
if(n %% 2 == 0) a[4*n + k] <- 2*a[2*n + (k == 2 | k == 3)] + (k == 0 | k == 2)
else a[4*n + k] <- 2*a[2*n + (k == 2 | k == 3)] + (k == 1 | k == 3)
}
(a <- c(0, a))
# Yosu Yurramendi, Oct 25 2020
CROSSREFS
Sequence in context: A207334 A294660 A180198 * A284120 A183081 A140595
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 15 2010
STATUS
approved