OFFSET
1,1
COMMENTS
a(n) = (n+1)^3 - (n-1), where (n+1)^3 is the number of ways of selecting a triple from n+1 numbers in these subintervals, and there are n-1 of these triples, (3,3,3) up to (n-2,n-2,n-2), where all values are the same, which are discarded. - R. J. Mathar, Oct 09 2020
LINKS
R. H. Hardin, Table of n, a(n) for n = 1..210
FORMULA
a(n) = n^3 + 3*n^2 + 2*n + 2 = 2*A158842(n+1).
From Colin Barker, Nov 12 2018: (Start)
G.f.: 2*x*(4 - 3*x + 3*x^2 - x^3) / (1 - x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4.
(End)
EXAMPLE
Some solutions for n=6:
2 0 1 2 6 4 0 1 0 0 2 4 6 2 4 0
4 4 7 7 2 4 2 3 1 6 1 2 3 6 5 5
6 4 7 2 4 7 8 5 3 6 4 7 5 8 8 2
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, Nov 19 2014
STATUS
approved