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 A262881 #16 Oct 13 2015 11:28:38 %S A262881 0,0,1,0,1,2,0,1,2,3,0,1,2,4,3,0,1,2,4,3,5,0,1,2,4,3,5,6,0,1,2,4,3,5, %T A262881 6,7,0,1,2,4,8,3,5,6,7,0,1,2,4,8,3,5,6,9,7,0,1,2,4,8,3,5,6,9,10,7,0,1, %U A262881 2,4,8,3,5,6,9,10,7,11,0,1,2,4,8,3,5,6,9,10,12,7,11 %N A262881 Regular triangle where the n-th row lists the integers k between 0 and n ordered by increasing value of the Hamming weight of k, and if equal by increasing value of k. %H A262881 Michel Marcus, <a href="/A262881/b262881.txt">Table of n, a(n) for n = 0..2079</a> (64 rows) %e A262881 Triangle starts: %e A262881 0; %e A262881 0, 1; %e A262881 0, 1, 2; %e A262881 0, 1, 2, 3; %e A262881 0, 1, 2, 4, 3; %e A262881 0, 1, 2, 4, 3, 5; %e A262881 0, 1, 2, 4, 3, 5, 6; %e A262881 0, 1, 2, 4, 3, 5, 6, 7; %e A262881 0, 1, 2, 4, 8, 3, 5, 6, 7; %e A262881 0, 1, 2, 4, 8, 3, 5, 6, 9, 7; %e A262881 0, 1, 2, 4, 8, 3, 5, 6, 9, 10, 7; %e A262881 ... %t A262881 Table[SortBy[Range@ k, And[Total@ IntegerDigits[#, 2], k] &], {k, 10}] (* _Michael De Vlieger_, Oct 04 2015 *) %o A262881 (PARI) cmph(i, j) = if (hammingweight(i) != hammingweight(j), hammingweight(i) - hammingweight(j), i - j); %o A262881 row(n) = my(v = vector(n+1, k, k-1)); vecsort(v, cmph); %o A262881 tabl(nn) = for (n=0, nn, print(row(n));); %Y A262881 Cf. A000120 (Hamming weight), A262882 (right diagonal). %K A262881 nonn,base,tabl %O A262881 0,6 %A A262881 _Michel Marcus_, Oct 04 2015