A057558 Lexicographic ordering of MxMxMxM, where M={0,1,2,...}.
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 2, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 2, 0, 0, 2, 1, 0, 0, 3, 0, 0, 1, 0, 2, 0, 1, 1, 1, 0, 1, 2, 0, 0, 2, 0, 1, 0, 2, 1, 0, 0, 3, 0, 0, 1, 0, 0, 2, 1, 0, 1, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 0, 0, 2, 0, 0, 1, 2, 0, 1, 0, 2, 1, 0, 0, 3, 0, 0, 0
Offset: 1
Keywords
Examples
Flatten the list of ordered lattice points, (0,0,0,0) < (0,0,0,1) < (0,0,1,0) < ... as 0,0,0,0, 0,0,0,1, 0,0,1,0, ...
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..19380
Programs
-
Mathematica
lexicographicLattice[{dim_,maxHeight_}]:= Flatten[Array[Sort@Flatten[(Permutations[#1]&)/@IntegerPartitions[#1+dim-1,{dim}],1]&,maxHeight],1]; Flatten@lexicographicLattice[{4,4}]-1 (* by Peter J. C. Moses, Feb 10 2011 *)
Extensions
Extended by Clark Kimberling, Feb 10 2011