|
|
A057556
|
|
Lexicographic ordering of M x M x M, where M={0,1,2,...}.
|
|
5
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,15
|
|
COMMENTS
|
See A057557 for N x N x N, where N={1,2,3,...}.
The triples are sorted first according to their sum, then lexicographically. - Pontus von Brömssen, Aug 16 2023
|
|
LINKS
|
|
|
EXAMPLE
|
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
...
|
|
MATHEMATICA
|
lexicographicLattice[{dim_, maxHeight_}]:= Flatten[Array[Sort@Flatten[(Permutations[#1]&)/@IntegerPartitions[#1+dim-1, {dim}], 1]&, maxHeight], 1]; Flatten@lexicographicLattice[{3, 6}]-1
|
|
CROSSREFS
|
Cf. A144625 (each triple reversed).
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|