OFFSET
0,2
COMMENTS
Also degree of toric ideal associated with path with n+2 nodes [Eriksson].
Also number of triples (t_1, t_2, t_3) with all t_i in the range 0 <= t_i <= n such that at least one t_i + t_j = n (with i != j). - R. H. Hardin, Aug 04 2014
Conjecture: a(n) is the maximum number of areas that are defined by the 3n angle (n+1)-sectors in a triangle. - Nicolas Nagel, Sep 09 2016
LINKS
R. H. Hardin and N. J. A. Sloane, Table of n, a(n) for n = 0..1000 [First 210 terms from Hardin]
N. Eriksson, Toric ideals of homogeneous phylogenetic models, arXiv:math/0401175 [math.CO], 2004.
Nicolas Nagel, Example picture for angle (n+1)-sectors
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
G.f.: (1+4x+7x^2)/((1-x)^2*(1-x^2)).
a(2t) = 12t^2+6t+1, a(2t+1) = 12t^2+18t+6 (t >= 0).
The defining g.f. implies the recurrence a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4), an empirical discovery of R. H. Hardin.
a(n) = 3*n*(n+1)+(1+(-1)^n)/2. - Wesley Ivan Hurt, May 06 2016
E.g.f.: 3*x*(2 + x)*exp(x) + cosh(x). - Ilya Gutkovskiy, May 06 2016
EXAMPLE
Some triples for n=10 (from R. H. Hardin, Aug 04 2014):
..3....1....2....1....7....9....5....8....5....6....9....4...10....8....6....2
..3....3....8....9....3....3....7....2....9....4....3...10....9....1....8....7
..7....7...10....5....2....1....3....7....1....3....7....0....1....9....4....8
MAPLE
f:=n-> if n mod 2 = 0 then t:=n/2; 12*t^2+6*t+1 else
t:=(n-1)/2; 12*t^2+18*t+6; fi;
[seq(f(n), n=0..100)];
MATHEMATICA
CoefficientList[Series[(1 + 4 x + 7 x^2)/((1 - x)^2*(1 - x^2)), {x, 0, 52}], x] (* Michael De Vlieger, May 07 2016 *)
Table[3 n (n + 1) + (1 + (-1)^n)/2, {n, 0, 52}] (* or *)
LinearRecurrence[{2, 0, -2, 1}, {1, 6, 19, 36}, 53] (* Michael De Vlieger, Sep 12 2016 *)
PROG
(PARI) x='x+O('x^99); Vec((1+4*x+7*x^2)/((1-x)^2*(1-x^2))) \\ Altug Alkan, May 12 2016
(Magma) [3*n*(n+1)+(1+(-1)^n)/2 : n in [0..50]]; // Wesley Ivan Hurt, Sep 13 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 30 2004
EXTENSIONS
STATUS
approved