OFFSET
1,6
EXAMPLE
Flatten the list of ordered lattice points, (1,1,1) < (1,1,2) < (1,2,1) < ..., to 1,1,1, 1,1,2, 1,2,1, ...
MATHEMATICA
lexicographicLattice[{dim_, maxHeight_}]:= Flatten[Array[Sort@Flatten[(Permutations[#1]&)/@IntegerPartitions[#1+dim-1, {dim}], 1]&, maxHeight], 1]; Flatten@lexicographicLattice[{3, 6}]
(* By Peter J. C. Moses, Feb 10 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 07 2000
EXTENSIONS
Corrected and extended by Clark Kimberling,, Feb 10 2011.
STATUS
approved