OFFSET
0,1
COMMENTS
An exercise in Smith (1950), my secondary school algebra book.
For n > 0, also the number of (not necessarily maximal) cliques in the (n-1)-triangular grid graph. - Eric W. Weisstein, Nov 29 2017
REFERENCES
C. Smith, A Treatise on Algebra, Macmillan, London, 5th ed., 1950, p. 429, Example 2(i).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Eric Weisstein's World of Mathematics, Clique
Eric Weisstein's World of Mathematics, Triangular Grid Graph
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
From Chai Wah Wu, May 30 2016: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2.
G.f.: 2*(-4*x^2 + 2*x - 1)/(x - 1)^3. (End)
E.g.f.: exp(x)*(2 + 3*x^2). - Stefano Spezia, Dec 27 2021
MATHEMATICA
Table[3 n^2 - 3 n + 2, {n, 0, 100}] (* Vincenzo Librandi, Sep 05 2016 *)
LinearRecurrence[{3, -3, 1}, {2, 8, 20}, {0, 20}] (* Eric W. Weisstein, Nov 29 2017 *)
CoefficientList[Series[-2 (1 - 2 x + 4 x^2)/(-1 + x)^3, {x, 0, 20}], x] (* Eric W. Weisstein, Nov 29 2017 *)
PROG
(Magma) [3*n^2 - 3*n + 2: n in [0..70]]; // Vincenzo Librandi, Sep 05 2016
(PARI) a(n) = 3*n^2-3*n+2 \\ Altug Alkan, Sep 05 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 30 2014
STATUS
approved