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 A186003 lists those n for which i=n, the distance from (i,j,k) to the yz-plane. Every positive integer occurs exactly once in the array, so that as a sequence, A186003 is a permutation of the positive integers.
LINKS
G. C. Greubel, Table of n, a(n) for the first 50 rows, flattened
EXAMPLE
Northwest corner:
1, 2, 3, 5, 6, 7, 11
4, 8, 9, 15, 16, 17, 26
10, 18, 19, 30, 31, 32, 47
20, 33, 34, 51, 52, 53, 75
35, 54, 55, 79, 80, 81, 111
T(2,1)=4, the position of (2,1,1) 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, 1}];
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