%I #41 Apr 04 2019 10:48:21
%S 0,20,118,348,764,1420,2370,3668,5368,7524,10190,13420,17268,21788,
%T 27034,33060,39920,47668,56358,66044,76780,88620,101618,115828,131304,
%U 148100,166270,185868,206948,229564,253770,279620,307168,336468,367574,400540,435420,472268
%N Number of triangles in a Star of David of size n.
%C In a Star of David of size n, there are A135453(n) "size=1" triangles and 2*A228887(n) "size>1" triangles. See formula.
%C The number of matchstick units is A045946.
%H Colin Barker, <a href="/A299965/b299965.txt">Table of n, a(n) for n = 0..1000</a>
%H John King, <a href="/A299965/a299965.jpg">Star a=6, 84 matches, 118 triangles</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F a(n) = 9*n^3 + 12*n^2 - n.
%F a(n) = A135453(n) + 2 * A228887(n).
%F From _Colin Barker_, Apr 04 2019: (Start)
%F G.f.: 2*x*(10 - x)*(1 + 2*x) / (1 - x)^4.
%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>3.
%F (End)
%e For n=1, there are 12 (size=1) + 6 (size=4) + 2 (size=9) = 20 triangles.
%o (PARI) concat(0, Vec(2*x*(10 - x)*(1 + 2*x) / (1 - x)^4 + O(x^40))) \\ _Colin Barker_, Apr 04 2019
%Y Cf. A045946, A135453, A228887.
%Y For the total number of triangles in a different arrangement, see A002717 (for triangular matchstick), A045949 (for hexagonal matchstick).
%K nonn,easy
%O 0,2
%A _John King_, Feb 22 2018
|