%I #45 Sep 30 2024 12:55:20
%S 0,10,59,177,394,740,1245,1939,2852,4014,5455,7205,9294,11752,14609,
%T 17895,21640,25874,30627,35929,41810,48300,55429,63227,71724,80950,
%U 90935,101709,113302,125744,139065,153295,168464,184602,201739,219905,239130,259444
%N Number of upward triangles in a Star of David matchstick arrangement of size n.
%H Colin Barker, <a href="/A045950/b045950.txt">Table of n, a(n) for n = 0..1000</a>
%H Stefano Spezia, <a href="/A045950/a045950.jpg">Illustration for n = 3</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) = n*(10*n^2+9*n+1)/2.
%F From _Colin Barker_, Dec 02 2014: (Start)
%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 3.
%F G.f.: x*(x^2+19*x+10) / (x-1)^4. (End)
%F E.g.f.: exp(x)*x*(20 + 39*x + 10*x^2)/2. - _Stefano Spezia_, Sep 18 2024
%t A045950[n_] := n*(n*(10*n + 9) + 1)/2; Array[A045950, 50, 0] (* or *)
%t LinearRecurrence[{4, -6, 4, -1}, {0, 10, 59, 177}, 50] (* _Paolo Xausa_, Sep 18 2024 *)
%o (PARI) concat(0, Vec(x*(x^2+19*x+10)/(x-1)^4 + O(x^100))) \\ _Colin Barker_, Dec 02 2014
%Y Cf. A299965.
%K nonn,easy
%O 0,2
%A _R. K. Guy_
%E Name clarified by _Paolo Xausa_, Sep 19 2024