OFFSET
1,4
COMMENTS
The triples (i,j,k) are ordered first by maximal coordinate, and then lexicographically. - Charlie Neder, Dec 23 2018
LINKS
Charlie Neder, Table of n, a(n) for n = 1..1000
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
KEYWORD
nonn
AUTHOR
Matthew Campbell, Sep 17 2015
EXTENSIONS
Definition clarified by Charlie Neder, Dec 25 2018
STATUS
approved