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.

This page as a plain text file.
%I A360287 #31 Feb 02 2023 16:46:19
%S A360287 0,1,12,2,23,123,13,3,34,134,1234,234,24,124,14,4,45,145,1245,245,
%T A360287 2345,12345,1345,345,35,135,1235,235,25,125,15,5,56,156,1256,256,2356,
%U A360287 12356,1356,356,3456,13456,123456,23456,2456,12456,1456,456,46,146,1246,246
%N 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.
%C A360287 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}, ... .
%C A360287 a(n) is the concatenation of all terms in the n-th row of A227738 (for n>=1).
%H A360287 Alois P. Heinz, <a href="/A360287/b360287.txt">Table of n, a(n) for n = 0..16383</a>
%H A360287 Wikipedia, <a href="https://en.wikipedia.org/wiki/Gray_code">Gray code</a>
%F A360287 a(2^n-1) = a(A000225(n)) = n.
%F A360287 a(floor(2^(n+1)/3)) = a(A000975(n)) = A007908(n).
%e A360287 A003188(17) = 25 = 11001_2 gives a(17) = 145.
%p A360287 a:= n-> `if`(n=0, 0, (l-> parse(cat(seq(`if`(l[i]=1, i, [][]),
%p A360287      i=1..nops(l)))))(Bits[Split](Bits[Xor](n, iquo(n, 2))))):
%p A360287 seq(a(n), n=0..100);
%Y A360287 Cf. A000225, A000975, A003188, A007908, A048794, A227738.
%K A360287 nonn,look,base
%O A360287 0,3
%A A360287 _Alois P. Heinz_, Feb 01 2023