OFFSET
1,1
COMMENTS
Sun graphs are defined for n >= 3; extended to n=1 using closed form.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Molecular Topological Index
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = 4*n*(-3 + 3*n + n^2).
a(n) = 4*A090197(n).
G.f.: 4*x*(1 + 10*x - 5*x^2)/(1-x)^4. - Colin Barker, Aug 07 2012
E.g.f.: 4*x*(1 + 6*x + x^2)*exp(x). - G. C. Greubel, Jan 05 2019
MATHEMATICA
Table[4*n*(-3+3*n+n^2), {n, 1, 40}] (* G. C. Greubel, Jan 05 2019 *)
LinearRecurrence[{4, -6, 4, -1}, {4, 56, 180, 400}, 30] (* Harvey P. Dale, Mar 02 2024 *)
PROG
(PARI) vector(40, n, 4*n*(-3+3*n+n^2)) \\ G. C. Greubel, Jan 05 2019
(Magma) [4*n*(-3+3*n+n^2): n in [1..40]]; // G. C. Greubel, Jan 05 2019
(Sage) [4*n*(-3+3*n+n^2) for n in (1..40)] # G. C. Greubel, Jan 05 2019
(GAP) List([1..40], n -> 4*n*(-3+3*n+n^2)); # G. C. Greubel, Jan 05 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Jul 11 2011
STATUS
approved