OFFSET
1,3
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Graph Cycle
Eric Weisstein's World of Mathematics, King Graph
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 36*n^2 - 128*n + 112 for n > 1. - Andrew Howroyd, Jun 19 2017
From Colin Barker, Mar 11 2019: (Start)
G.f.: 4*x^3*(13 + 5*x) / (1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4. (End)
E.g.f.: 4*(exp(x)*(28 - 23*x + 9*x^2) - 28 - 5*x). - Stefano Spezia, Aug 14 2022
MATHEMATICA
Table[If[n == 1, 0, 4 (n - 2) (9 n - 14)], {n, 30}]
Join[{0, 0}, LinearRecurrence[{3, -3, 1}, {20, 0, 52}, {3, 20}]]
CoefficientList[Series[-((4 x^2 (13 + 5 x))/(-1 + x)^3), {x, 0, 20}], x]
PROG
(PARI) a(n)=if(n<3, 0, 36*n^2-128*n+112) \\ Charles R Greathouse IV, Jun 19 2017
(PARI) concat([0, 0], Vec(4*x^3*(13 + 5*x) / (1 - x)^3 + O(x^40))) \\ Colin Barker, Mar 11 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Jun 19 2017
STATUS
approved