cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Feb 20 2003

Keywords

Comments

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

Examples

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

Programs

  • 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 *)

Formula

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