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

In binary representation: keep the first digit and rotate right the others twice.
3

%I #17 Sep 03 2015 19:00:49

%S 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,

%T 30,19,23,27,31,32,40,48,56,33,41,49,57,34,42,50,58,35,43,51,59,36,44,

%U 52,60,37,45,53,61,38,46,54,62,39,47,55,63,64,80,96,112,65,81,97,113,66

%N In binary representation: keep the first digit and rotate right the others twice.

%C a(n) = A080542(A080542(n)); permutation of natural numbers with inverse = A080543: A080543(a(n))=a(A080543(n))=n.

%H Ivan Neretin, <a href="/A080544/b080544.txt">Table of n, a(n) for n = 1..8192</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(n) = n - 3*A053645(A002265(n)) + (2^(A000523(n)-2)-1)*A010873(n) for n >= 4. - _Robert Israel_, Sep 01 2015

%e a(20)=a('10100')='10001'=17; a(25)=a('11001')='10110'=22.

%p f:= proc(n) local m,a;

%p m:= ilog2(n);

%p a:= n mod 4;

%p (n - a - 2^m)/4 + 2^(m-2)*a+2^m

%p end proc:

%p f(2):= 2:

%p map(f, [$1..100]); # _Robert Israel_, Sep 01 2015

%t Table[FromDigits[Prepend[RotateRight[Rest[IntegerDigits[n, 2]], 2], 1], 2], {n, 72}] (* _Ivan Neretin_, Aug 30 2015 *)

%K nonn,base

%O 1,2

%A _Reinhard Zumkeller_, Feb 20 2003