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.
%I A382467 #16 Apr 02 2025 18:48:40 %S A382467 0,0,1,0,1,3,2,0,1,3,7,2,5,6,4,0,1,3,7,15,2,5,6,11,13,14,4,9,10,12,8, %T A382467 0,1,3,7,15,31,2,5,6,11,13,14,23,27,29,30,4,9,10,12,19,21,22,25,26,28, %U A382467 8,17,18,20,24,16,0,1,3,7,15,31,63,2,5,6,11,13,14,23,27,29,30 %N A382467 Irregular triangle read by rows, where row n lists the integers from 0 to 2^n - 1 sorted by the number of zeros in their binary representation (in case of ties, by their decimal value). %H A382467 Paolo Xausa, <a href="/A382467/b382467.txt">Table of n, a(n) for n = 0..8190</a> (rows 0..12 of triangle, flattened). %e A382467 Triangle begins: %e A382467 [0] 0; %e A382467 [1] 0, 1; %e A382467 [2] 0, 1, 3, 2; %e A382467 [3] 0, 1, 3, 7, 2, 5, 6, 4; %e A382467 [4] 0, 1, 3, 7, 15, 2, 5, 6, 11, 13, 14, 4, 9, 10, 12, 8; %e A382467 ... %p A382467 b:= proc(n) b(n):= add(1-i, i=Bits[Split](n)) end: %p A382467 T:= n-> sort([$0..2^n-1], (x, y)-> b(x)<b(y) or b(x)=b(y) and x<y)[]: %p A382467 seq(T(n), n=0..6); # _Alois P. Heinz_, Mar 31 2025 %t A382467 Table[SortBy[Range[0, 2^n - 1], DigitCount[#, 2, 0] &], {n, 0, 6}] %Y A382467 Cf. A080791, A294648 (sorted by number of ones). %Y A382467 Main diagonal gives A000225. %Y A382467 Last elements of rows give A131577. %Y A382467 Row sums give A006516. %K A382467 nonn,tabf,look,base,easy %O A382467 0,6 %A A382467 _Paolo Xausa_, Mar 31 2025