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.

A360287 a(n) is the concatenation of the positions of 1-bits in the binary expansion of the Gray code for n, when 1 is the rightmost position; a(0) = 0.

Original entry on oeis.org

0, 1, 12, 2, 23, 123, 13, 3, 34, 134, 1234, 234, 24, 124, 14, 4, 45, 145, 1245, 245, 2345, 12345, 1345, 345, 35, 135, 1235, 235, 25, 125, 15, 5, 56, 156, 1256, 256, 2356, 12356, 1356, 356, 3456, 13456, 123456, 23456, 2456, 12456, 1456, 456, 46, 146, 1246, 246
Offset: 0

Views

Author

Alois P. Heinz, Feb 01 2023

Keywords

Comments

a(n) represents the n-th finite subset of positive integers in Gray order, two consecutive sets differ in exactly one member: {}, {1}, {1,2}, {2}, {2,3}, {1,2,3}, {1,3}, {3}, {3,4}, {1,3,4}, {1,2,3,4}, {2,3,4}, ... .
a(n) is the concatenation of all terms in the n-th row of A227738 (for n>=1).

Examples

			A003188(17) = 25 = 11001_2 gives a(17) = 145.
		

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 0, (l-> parse(cat(seq(`if`(l[i]=1, i, [][]),
         i=1..nops(l)))))(Bits[Split](Bits[Xor](n, iquo(n, 2))))):
    seq(a(n), n=0..100);

Formula

a(2^n-1) = a(A000225(n)) = n.
a(floor(2^(n+1)/3)) = a(A000975(n)) = A007908(n).