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”).

A180201
Inverse permutation to A180200.
6
0, 1, 2, 3, 5, 4, 6, 7, 11, 10, 8, 9, 13, 12, 14, 15, 23, 22, 20, 21, 17, 16, 18, 19, 27, 26, 24, 25, 29, 28, 30, 31, 47, 46, 44, 45, 41, 40, 42, 43, 35, 34, 32, 33, 37, 36, 38, 39, 55, 54, 52, 53, 49, 48, 50, 51, 59, 58, 56, 57, 61, 60, 62, 63, 95, 94, 92, 93, 89, 88, 90, 91, 83
OFFSET
0,3
COMMENTS
A180199(n) = a(a(n));
a(A180198(n)) = A180198(a(n)) = A180200(n);
a(A075427(n)) = A075427(n).
This permutation transforms the enumeration system of positive irreducible fractions A245325/A245326 into the enumeration system A007305/A047679 (Stern-Brocot), and enumeration system A071766/A229742 (HCS) into A162909/A162910 (Bird). - Yosu Yurramendi, Jun 09 2015
FORMULA
a(n) = A258746(A233280(n)) = A233280(A117120(n)), n > 0. - Yosu Yurramendi, Apr 10 2017
a(0) = 0, a(1) = 1, for n > 0 a(2*n) = 2*a(n) + [n even], a(2*n + 1) = 2*a(n) + [n odd]. - Yosu Yurramendi, May 23 2020
PROG
(R)
#
maxn <- 63 # by choice
a <- 1
for(n in 1:maxn){
a[2*n ] <- 2*a[n] + (n%%2 == 0)
a[2*n+1] <- 2*a[n] + (n%%2 != 0)}
a <- c(0, a)
# Yosu Yurramendi, May 23 2020
CROSSREFS
Sequence in context: A153150 A069766 A081241 * A233277 A279339 A279349
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 15 2010
STATUS
approved