[go: up one dir, main page]

login
Search: a186003 -id:a186003
     Sort: relevance | references | number | modified | created      Format: long | short | data
Lexicographic ordering of NxNxN, where N={1,2,3,...}.
+10
9
1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 3, 1, 2, 2, 1, 3, 1, 2, 1, 2, 2, 2, 1, 3, 1, 1, 1, 1, 4, 1, 2, 3, 1, 3, 2, 1, 4, 1, 2, 1, 3, 2, 2, 2, 2, 3, 1, 3, 1, 2, 3, 2, 1, 4, 1, 1, 1, 1, 5, 1, 2, 4, 1, 3, 3, 1, 4, 2, 1, 5, 1, 2, 1, 4, 2, 2, 3, 2, 3, 2, 2, 4, 1, 3, 1, 3, 3, 2, 2, 3, 3, 1, 4, 1, 2, 4, 2, 1, 5, 1, 1, 1, 1, 6, 1, 2, 5, 1, 3, 4, 1, 4, 3, 1, 5, 2, 1, 6, 1, 2, 1, 5, 2, 2, 4, 2, 3, 3, 2, 4, 2, 2, 5, 1, 3, 1, 4, 3, 2, 3, 3, 3, 2, 3, 4, 1, 4, 1, 3, 4, 2, 2, 4, 3, 1, 5, 1, 2, 5, 2, 1, 6, 1, 1
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
A057555: ordering of N^2
A057559: ordering of N^4
A186006: ordering of N^5
A186003: distances to the plane x=0
A186004: distances to the plane y=0
A186005: distances to the plane z=0
KEYWORD
nonn
AUTHOR
Clark Kimberling, Sep 07 2000
EXTENSIONS
Corrected and extended by Clark Kimberling,, Feb 10 2011.
STATUS
approved
Distance array associated with ordering A057557 of N X N X N, by antidiagonals (distances to xz plane).
+10
4
1, 2, 3, 4, 6, 7, 5, 9, 13, 14, 8, 12, 17, 24, 25, 10, 16, 23, 29, 40, 41, 11, 19, 28, 39, 46, 62, 63, 15, 22, 32, 45, 61, 69, 91, 92, 18, 27, 38, 50, 68, 90, 99, 128, 129, 20, 31, 44, 60, 74, 98, 127, 137, 174, 175, 21, 34, 49, 67, 89, 105, 136, 173, 184, 230, 231, 26, 37, 53, 73, 97, 126, 144, 183, 229, 241, 297, 298
OFFSET
1,2
COMMENTS
Let n=n(i,j,k) be the position of (i,j,k) in the lexicographic ordering A057557 of N X N X N, where N={1,2,3,...}. Row h of A186004 lists those n for which j=n, the distance from (i,j,k) to the xz-plane. Every positive integer occurs exactly once in the array, so that as a sequence, A186004 is a permutation of the positive integers.
EXAMPLE
Northwest corner:
1, 2, 4, 5, 8, 10
3, 6, 9, 12, 16, 19
7, 13, 17, 23, 28, 32
14, 24, 29, 39, 45, 50
25, 40, 46, 61, 68, 74
T(2,2)=6, the position of (1,2,2) in the ordering
(1,1,1) < (1,1,2) < (1,2,1) < (2,1,1) < (1,1,3) < (1,2,2) < (1,3,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];
llha=lexicographicLatticeHeightArray[{3, 12, 2}];
ordering=lexicographicLattice[{2, Length[llha]}];
llha[[#1, #2]]&@@#1&/@ordering
(* Peter J. C. Moses, Feb 15 2011 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Feb 10 2011
STATUS
approved
Distance array associated with ordering A057557 of N X N X N by antidiagonals (distances to xy plane).
+10
4
1, 3, 2, 4, 6, 5, 7, 8, 12, 11, 9, 13, 15, 22, 21, 10, 16, 23, 26, 37, 36, 14, 18, 27, 38, 42, 58, 57, 17, 24, 30, 43, 59, 64, 86, 85, 19, 28, 39, 47, 65, 87, 93, 122, 121, 20, 31, 44, 60, 70, 94, 123, 130, 167, 166, 25, 33, 48, 66, 88, 100, 131, 168, 176, 222, 221, 29, 40, 51, 71, 95, 124, 138, 177, 223, 232, 288, 287
OFFSET
1,2
COMMENTS
Let n=n(i,j,k) be the position of (i,j,k) in the lexicographic ordering A057557 of N X N X N, where N={1,2,3,...}. Row h of A186005 lists those n for which k=n, the distance from (i,j,k) to the xy-plane. Every positive integer occurs exactly once in the array, so that as a sequence, A186005 is a permutation of the positive integers.
EXAMPLE
T(2,2)=6, the position of (1,2,2) in the ordering
(1,1,1) < (1,1,2) < (1,2,1) < (2,1,1) < (1,1,3) < (1,2,2) < (1,3,1) < ...
Northwest corner:
1, 3, 4, 7, 9, 10
2, 6, 8, 13, 16, 18
5, 12, 15, 23, 27, 30
11, 22, 26, 38, 43, 47
21, 37, 42, 59, 65, 70
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];
llha=lexicographicLatticeHeightArray[{3, 12, 3}];
ordering=lexicographicLattice[{2, Length[llha]}];
llha[[#1, #2]]&@@#1&/@ordering
(* Peter J. C. Moses, Feb 15 2011 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Clark Kimberling, Feb 10 2011
STATUS
approved

Search completed in 0.005 seconds