OFFSET
0,3
COMMENTS
See the comment in A226449.
For n >= 3, also the detour index of the n-barbell graph. - Eric W. Weisstein, Dec 20 2017
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Eric Weisstein's World of Mathematics, Barbell Graph
Eric Weisstein's World of Mathematics, Detour Index
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
MATHEMATICA
Table[n (3 n^2 - 5 n + 3), {n, 0, 40}]
CoefficientList[Series[x (1 + 6 x + 11 x^2)/(1 - x)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 18 2013 *)
LinearRecurrence[{4, -6, 4, -1}, {1, 10, 45, 124}, {0, 20}] (* Eric W. Weisstein, Dec 20 2017 *)
PROG
(Magma) [n*(3*n^2-5*n+3): n in [0..40]];
(Magma) I:=[0, 1, 10, 45]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..45]]; // Vincenzo Librandi, Aug 18 2013
(PARI) a(n) = n*(3*n^2 - 5*n + 3); \\ Altug Alkan, Dec 20 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jun 07 2013
STATUS
approved