login
A260617
Three-dimensional array read by shells: S(i, j, k) = i + j + k; i >= 0, j >= 0, k >= 0.
2
0, 1, 1, 2, 1, 2, 2, 3, 2, 3, 2, 3, 4, 3, 4, 3, 4, 5, 2, 3, 4, 3, 4, 5, 4, 5, 6, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 5, 6, 7, 8, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 8, 6, 7, 8, 9, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 5, 6, 7, 8, 9, 6, 7, 8, 9, 6, 7, 8, 9, 10
OFFSET
1,4
COMMENTS
The triples (i,j,k) are ordered first by maximal coordinate, and then lexicographically. - Charlie Neder, Dec 23 2018
LINKS
Matthew Campbell, Coordinate Pattern
EXAMPLE
S(0, 0, 0) = 0 + 0 + 0 = 0.
S(0, 0, 1) = 0 + 0 + 1 = 1.
S(0, 1, 0) = 0 + 1 + 0 = 1.
S(0, 1, 1) = 0 + 1 + 1 = 2.
S(1, 0, 0) = 1 + 0 + 0 = 1.
S(1, 0, 1) = 1 + 0 + 1 = 2.
S(1, 1, 0) = 1 + 1 + 0 = 2.
S(1, 1, 1) = 1 + 1 + 1 = 3.
S(0, 0, 2) = 0 + 0 + 2 = 2.
...
PROG
(Python)
s = lambda x, y, z : x+y+z # function for 3d array
i = 1
for n in range(0, 10):
..for x in range(0, n+1):
....for y in range(0, n+1):
......if (x!=n and y!=n):
........print(i, s(x, y, n))
........i += 1
......else:
........for z in range(0, n+1):
..........print(i, s(x, y, z))
..........i += 1
# Charlie Neder, Dec 26 2018
CROSSREFS
Sequence in context: A290983 A272887 A143966 * A178695 A185315 A232548
KEYWORD
nonn
AUTHOR
Matthew Campbell, Sep 17 2015
EXTENSIONS
Definition clarified by Charlie Neder, Dec 25 2018
STATUS
approved