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