cp's OEIS Frontend

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.

A299965 Number of triangles in a Star of David of size n.

Original entry on oeis.org

0, 20, 118, 354, 788, 1480, 2490, 3878, 5704, 8028, 10910, 14410, 18588, 23504, 29218, 35790, 43280, 51748, 61254, 71858, 83620, 96600, 110858, 126454, 143448, 161900, 181870, 203418, 226604, 251488, 278130, 306590, 336928, 369204, 403478, 439810, 478260, 518888
Offset: 0

Views

Author

John King, Feb 22 2018

Keywords

Comments

In a Star of David of size n, there are A135453(n) "size=1" triangles.
The number of matchstick units is A045946.

Examples

			For n=1, there are 12 (size=1) + 6 (size=4) + 2 (size=9) = 20 triangles.
		

Crossrefs

For the total number of triangles in a different arrangement, see A002717 (for triangular matchstick), A045949 (for hexagonal matchstick).

Programs

  • Mathematica
    A299965[n_] := n*(n*(10*n + 9) + 1); Array[A299965, 50, 0] (* or *)
    LinearRecurrence[{4, -6, 4, -1}, {0, 20, 118, 354}, 50] (* Paolo Xausa, Sep 18 2024 *)
  • PARI
    concat(0, Vec(2*x*(10 + 19*x + x^2) / (1 - x)^4 + O(x^40))) \\ Colin Barker, Apr 04 2019

Formula

a(n) = n*(10*n^2+9*n+1) = 2*A045950(n).
From Colin Barker, Apr 04 2019: (Start)
G.f.: 2*x*(10 + 19*x + x^2) / (1 - x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>3. (End)
E.g.f.: exp(x)*x*(20 + 39*x + 10*x^2). - Stefano Spezia, Sep 20 2024

Extensions

Corrected by John King, Stefano Spezia, and Paolo Xausa, Sep 20 2024