OFFSET
0,3
COMMENTS
MATHEMATICA
Last /@ Table[SortBy[Range@ k, And[Total@ IntegerDigits[#, 2], k] &], {k, 67}] (* Michael De Vlieger, Oct 04 2015 *)
PROG
(PARI) cmph(i, j) = if (hammingweight(i) != hammingweight(j), hammingweight(i) - hammingweight(j), i - j);
row(n) = my(v = vector(n+1, k, k-1)); vecsort(v, cmph);
lista(nn) = {for (n=0, nn, my(r = srow(n)); print1(r[#r], ", "); ); }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Oct 04 2015
STATUS
approved