OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
S. Klavzar, A. Rajapakse, I. Gutman, The Szeged and the Wiener index of graphs, Appl. Math. Lett., 9, 1996, 45-49.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = (1/2)*n*(17*n^2 - 9).
a(n) = A245826(n, 3).
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4). G.f.: x*(4*x^2+43*x+4) / (x-1)^4. - Colin Barker, Aug 07 2014
MAPLE
a := proc (n) options operator, arrow: (1/2)*n*(17*n^2-9) end proc: seq(a(n), n = 1 .. 40);
MATHEMATICA
CoefficientList[Series[(4 x^2 + 43 x + 4)/(x - 1)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 07 2014 *)
LinearRecurrence[{4, -6, 4, -1}, {4, 59, 216, 526}, 40] (* Harvey P. Dale, Oct 21 2017 *)
PROG
(PARI) Vec(x*(4*x^2+43*x+4)/(x-1)^4 + O(x^100)) \\ Colin Barker, Aug 07 2014
(Magma) [(1/2)*n*(17*n^2 - 9): n in [1..40]]; // Vincenzo Librandi, Aug 07 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch, Aug 06 2014
STATUS
approved