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

A080544
In binary representation: keep the first digit and rotate right the others twice.
3
1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 9, 11, 13, 15, 16, 20, 24, 28, 17, 21, 25, 29, 18, 22, 26, 30, 19, 23, 27, 31, 32, 40, 48, 56, 33, 41, 49, 57, 34, 42, 50, 58, 35, 43, 51, 59, 36, 44, 52, 60, 37, 45, 53, 61, 38, 46, 54, 62, 39, 47, 55, 63, 64, 80, 96, 112, 65, 81, 97, 113, 66
OFFSET
1,2
COMMENTS
a(n) = A080542(A080542(n)); permutation of natural numbers with inverse = A080543: A080543(a(n))=a(A080543(n))=n.
FORMULA
a(n) = n - 3*A053645(A002265(n)) + (2^(A000523(n)-2)-1)*A010873(n) for n >= 4. - Robert Israel, Sep 01 2015
EXAMPLE
a(20)=a('10100')='10001'=17; a(25)=a('11001')='10110'=22.
MAPLE
f:= proc(n) local m, a;
m:= ilog2(n);
a:= n mod 4;
(n - a - 2^m)/4 + 2^(m-2)*a+2^m
end proc:
f(2):= 2:
map(f, [$1..100]); # Robert Israel, Sep 01 2015
MATHEMATICA
Table[FromDigits[Prepend[RotateRight[Rest[IntegerDigits[n, 2]], 2], 1], 2], {n, 72}] (* Ivan Neretin, Aug 30 2015 *)
CROSSREFS
Sequence in context: A270189 A257672 A285314 * A178878 A175326 A018676
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Feb 20 2003
STATUS
approved