OFFSET
2,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 2..10000
A. A. Dobrynin, I. Gutman, S. Klavzar, P. Zigert, Wiener Index of Hexagonal Systems , Acta Applicandae Mathematicae 72 (2002), pp. 247-294.
I. Gutman, S. Klavzar, M. Petkovsek, and P. Zigert, On Hosoya polynomials of benzenoid graphs, Comm. Math. Comp. Chem. (MATCH), 43, 2001, 49-66.
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
a(n) = 4*n^3 + 20*n^2 - 12*n + 2*(-1)^n*(n-2) + 21.
G.f.: x^2*(109+53*x-98*x^2+14*x^3+53*x^4-35*x^5)/((1+x)^2*(1-x)^4). - Bruno Berselli, Jul 27 2011
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6), with a(2)=109, a(3)=271, a(4)=553, a(5)=955, a(6)=1541, a(7)=2279. - Harvey P. Dale, Aug 26 2011
MAPLE
a := proc (n) options operator, arrow: 4*n^3+20*n^2-12*n+2*(-1)^n*(n-2)+21 end proc: seq(a(n), n = 2 .. 40);
MATHEMATICA
Table[4n^3+20n^2-12n+2(-1)^n(n-2)+21, {n, 2, 40}] (* or *) LinearRecurrence[ {2, 1, -4, 1, 2, -1}, {109, 271, 553, 955, 1541, 2279}, 39] (* Harvey P. Dale, Aug 26 2011 *)
PROG
(Magma) [4*n^3 + 20*n^2 - 12*n + 2*(-1)^n*(n-2) + 21: n in [2..40]]; // Vincenzo Librandi, Jul 26 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch, Jul 25 2011
STATUS
approved