OFFSET
1,3
COMMENTS
See P(n) in Theorem 2.1, p.2 of Zhu.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Jun-Ming Zhu, The number of convex pentagons and hexagons in an n-triangular net, arXiv:1012.4058 [math.CO], 2010. See P(n), formula (1), page 2.
Index entries for linear recurrences with constant coefficients, signature (5,-9,5,5,-9,5,-1).
FORMULA
From G. C. Greubel, Jul 03 2021: (Start)
a(n) = (1/320)*(12*n^5 - 10*n^4 - 60*n^3 + 40*n^2 + 48*n - 15 + 15*(-1)^n).
a(2*n+1) = n*(n+1)*(12*n^3 + 13*n^2 - 8*n - 2)/10.
a(2*n) = n*(4*n-3)*(3*n+1)*(n-1)*(n+1)/10.
G.f.: 3*x^3*(1 + 2*x)/((1 + x)*(1 - x)^6).
E.g.f.: (1/320)*(15*exp(-x) - (15 -30*x +30*x^2 -180*x^3 -110*x^4 -12*x^5)*exp(x)). (End)
MAPLE
A176646:= n-> (12*n^5 -10*n^4 -60*n^3 +40*n^2 +48*n -15 +15*(-1)^n)/320;
seq(A176646(n), n=1..40); # R. J. Mathar, Dec 21 2010
MATHEMATICA
LinearRecurrence[{5, -9, 5, 5, -9, 5, -1}, {0, 0, 3, 21, 78, 216, 498}, 40] (* Harvey P. Dale, Jan 14 2015 *)
PROG
(Magma) [(1/320)*(12*n^5 -10*n^4 -60*n^3 +40*n^2 +48*n -15 +15*(-1)^n): n in [1..40]]; // G. C. Greubel, Jul 02 2021
(Sage) [(1/320)*(12*n^5 -10*n^4 -60*n^3 +40*n^2 +48*n -15 +15*(-1)^n) for n in (1..40)] # G. C. Greubel, Jul 02 2021
(PARI) f(k) = (12*k^5 + 25*k^4 + 5*k^3 - 10*k^2 - 2*k)/10;
g(k) = (12*k^5 - 5*k^4 - 15*k^3 + 5*k^2 + 3*k)/10;
a(n) = if (n%2, f((n-1)/2), g(n/2)); \\ Michel Marcus, Jul 04 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Dec 21 2010
EXTENSIONS
Definition corrected and edited by Michel Marcus and G. C. Greubel, Jul 03 2021
STATUS
approved