%I #46 Sep 08 2022 08:45:53
%S 0,0,3,21,78,216,498,1014,1884,3264,5349,8379,12642,18480,26292,36540,
%T 49752,66528,87543,113553,145398,184008,230406,285714,351156,428064,
%U 517881,622167,742602,880992,1039272,1219512,1423920,1654848,1914795,2206413,2532510,2896056
%N a(n) is the number of convex pentagons in an n-triangular net.
%C See P(n) in Theorem 2.1, p.2 of Zhu.
%H G. C. Greubel, <a href="/A176646/b176646.txt">Table of n, a(n) for n = 1..1000</a>
%H Jun-Ming Zhu, <a href="http://arxiv.org/abs/1012.4058">The number of convex pentagons and hexagons in an n-triangular net</a>, arXiv:1012.4058 [math.CO], 2010. See P(n), formula (1), page 2.
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (5,-9,5,5,-9,5,-1).
%F From _G. C. Greubel_, Jul 03 2021: (Start)
%F a(n) = (1/320)*(12*n^5 - 10*n^4 - 60*n^3 + 40*n^2 + 48*n - 15 + 15*(-1)^n).
%F a(2*n+1) = n*(n+1)*(12*n^3 + 13*n^2 - 8*n - 2)/10.
%F a(2*n) = n*(4*n-3)*(3*n+1)*(n-1)*(n+1)/10.
%F G.f.: 3*x^3*(1 + 2*x)/((1 + x)*(1 - x)^6).
%F 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)
%F a(n) = 3*A001753(n-3) + 6*A001753(n-4). - _R. J. Mathar_, Jul 04 2021
%p A176646:= n-> (12*n^5 -10*n^4 -60*n^3 +40*n^2 +48*n -15 +15*(-1)^n)/320;
%p seq(A176646(n), n=1..40); # _R. J. Mathar_, Dec 21 2010
%t LinearRecurrence[{5,-9,5,5,-9,5,-1}, {0,0,3,21,78,216,498}, 40] (* _Harvey P. Dale_, Jan 14 2015 *)
%o (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
%o (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
%o (PARI) f(k) = (12*k^5 + 25*k^4 + 5*k^3 - 10*k^2 - 2*k)/10;
%o g(k) = (12*k^5 - 5*k^4 - 15*k^3 + 5*k^2 + 3*k)/10;
%o a(n) = if (n%2, f((n-1)/2), g(n/2)); \\ _Michel Marcus_, Jul 04 2021
%Y Cf. A166189 (for the hexagons).
%K nonn,easy
%O 1,3
%A _Jonathan Vos Post_, Dec 21 2010
%E Definition corrected and edited by _Michel Marcus_ and _G. C. Greubel_, Jul 03 2021