OFFSET
1,10
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
EXAMPLE
First, list the 5-tuples in lexicographic order: (1,1,1,1,1) < (1,1,1,1,2) < (1,1,1,2,1) < (1,1,2,1,1) < ... < (1,2,2,1,1) < (1,1,3,1,1) < ... Then flatten the list, leaving 1,1,1,1,1, 1,1,1,1,2, 1,1,1,2,1, 1,1,2,1,1, ...
MATHEMATICA
lexicographicLattice[{dim_, maxHeight_}]:= Flatten[Array[Sort@Flatten[(Permutations[#1]&)/@IntegerPartitions[#1+dim-1, {dim}], 1]&, maxHeight], 1];
lexicographicLatticeHeightArray[{dim_, maxHeight_, axis_}]:= Array[Flatten@Position[Map[#[[axis]]&, lexicographicLattice[{dim, maxHeight}]], #]&, maxHeight]
Take[Flatten@lexicographicLattice[{5, 12}], 160]
(* Peter J. C. Moses, Feb 10 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 10 2011
STATUS
approved