OFFSET
0,6
COMMENTS
The integers in the k-th row are first ordered by the number of 1 in their binary representation (Hamming weight). Elements of the same Hamming weight are ordered by reverse colexicographical order.
The k-th row corresponds to the graded lexicographical order of monomials. For example, with k=3, the monomial are ordered as {1, x0, x1, x2, x1*x0, x2*x0, x2*x1, x2*x1*x0}. This ordering of monomial leads to efficient implementation of polynomial long division (see Links section).
LINKS
FORMULA
EXAMPLE
As an irregular triangle:
0;
0, 1;
0, 1, 2, 3;
0, 1, 2, 4, 3, 5, 6, 7;
0, 1, 2, 4, 8, 3, 5, 9, 6, 10, 12, 7, 11, 13, 14, 15;
...
For k = 4, the graded lexicographical order of integers 0..15 written in base 2 is
0000
0001, 0010, 0100, 1000,
0011, 0101, 1001, 0110, 1010, 1100,
0111, 1011, 1101, 1110,
1111
Note that 1001 < 0110 as the least significant digit on which they differ is the last one, and 1 < 0 due to the reverse colexicographical ordering.
MAPLE
T:= n-> map(x-> add(2^(i-1), i=x), [seq(
combinat[choose]([$1..n], i)[], i=0..n)])[]:
seq(T(n), n=0..6); # Alois P. Heinz, Feb 03 2023
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
AUTHOR
Jean Liénardy, Jan 19 2023
STATUS
approved