OFFSET
0,4
COMMENTS
For each n, there are (n+1)^3 ordered triples, ranging in lexicographical order from (0,0,0) to (n,n,n). For n = 3, the ordered triples (w,x,y) for which |w-x|, |x-y|, |y-w| are distinct are listed in the Example.
For a guide to related sequences, see A212959.
The ambiguous term "ordered triple" here means that the order matters: (w,x,y) is a different triple from (w,y,x), etc. It does not mean that w<x<y. - N. J. A. Sloane, Dec 28 2021
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
FORMULA
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5).
G.f.: 12*x^3/((1 + x)*(1 - x)^4).
a(n+3) = 12*A002623(n).
a(n) = (2*n^3 - 3*n^2 - 2*n + 3*(n mod 2))/2. - Ayoub Saber Rguez, Dec 06 2021
EXAMPLE
a(3) counts the 12 ordered triples in the first column of the following list:
(w,x,y) (|w-x|,|x-y|,|y-w|)
----------------------------
(0,1,3) (1,2,3)
(0,2,3) (2,1,3)
(0,3,1) (3,2,1)
(0,3,2) (3,1,2)
(1,0,3) (1,3,2)
(1,3,0) (2,3,1)
(2,0,3) (2,3,1)
(2,3,0) (1,3,2)
(3,0,1) (3,1,2)
(3,0,2) (3,2,1)
(3,1,0) (2,1,3)
(3,2,0) (1,2,3)
MATHEMATICA
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 02 2012
EXTENSIONS
Definition corrected by Clark Kimberling, Dec 28 2021
STATUS
approved