This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A299965 #63 Sep 22 2024 03:07:33 %S A299965 0,20,118,354,788,1480,2490,3878,5704,8028,10910,14410,18588,23504, %T A299965 29218,35790,43280,51748,61254,71858,83620,96600,110858,126454,143448, %U A299965 161900,181870,203418,226604,251488,278130,306590,336928,369204,403478,439810,478260,518888 %N A299965 Number of triangles in a Star of David of size n. %C A299965 In a Star of David of size n, there are A135453(n) "size=1" triangles. %C A299965 The number of matchstick units is A045946. %H A299965 Paolo Xausa, <a href="/A299965/b299965.txt">Table of n, a(n) for n = 0..10000</a> (corrected and extended original b-file from Colin Barker after data change). %H A299965 John King, <a href="/A299965/a299965.jpg">Star a=6, 84 matches, 118 triangles</a> %H A299965 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1). %F A299965 a(n) = n*(10*n^2+9*n+1) = 2*A045950(n). %F A299965 From _Colin Barker_, Apr 04 2019: (Start) %F A299965 G.f.: 2*x*(10 + 19*x + x^2) / (1 - x)^4. %F A299965 a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>3. (End) %F A299965 E.g.f.: exp(x)*x*(20 + 39*x + 10*x^2). - _Stefano Spezia_, Sep 20 2024 %e A299965 For n=1, there are 12 (size=1) + 6 (size=4) + 2 (size=9) = 20 triangles. %t A299965 A299965[n_] := n*(n*(10*n + 9) + 1); Array[A299965, 50, 0] (* or *) %t A299965 LinearRecurrence[{4, -6, 4, -1}, {0, 20, 118, 354}, 50] (* _Paolo Xausa_, Sep 18 2024 *) %o A299965 (PARI) concat(0, Vec(2*x*(10 + 19*x + x^2) / (1 - x)^4 + O(x^40))) \\ _Colin Barker_, Apr 04 2019 %Y A299965 Cf. A045950, A045946, A135453, %Y A299965 For the total number of triangles in a different arrangement, see A002717 (for triangular matchstick), A045949 (for hexagonal matchstick). %K A299965 nonn,easy,less %O A299965 0,2 %A A299965 _John King_, Feb 22 2018 %E A299965 Corrected by _John King_, _Stefano Spezia_, and _Paolo Xausa_, Sep 20 2024