OFFSET
1,2
COMMENTS
This was once thought (mistakenly) to be a formula for A262402.
LINKS
Peter Kagey, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (4, -6, 4, -1).
FORMULA
G.f.: -2 * (x^3-2*x^2-2*x-9) * x^2 / (x-1)^4.
MATHEMATICA
CoefficientList[Series[- 2 x (x^3 - 2 x^2 - 2 x - 9)/(x - 1)^4, {x, 0, 30}], x] (* Vincenzo Librandi, Sep 23 2015 *)
Join[{0}, LinearRecurrence[{4, -6, 4, -1}, {18, 76, 200, 414}, 38]] (* Ray Chandler, Sep 23 2015 *)
Join[{0}, Table[4n^3-3n^2-3n+4, {n, 2, 40}]] (* Harvey P. Dale, Mar 28 2019 *)
PROG
(Magma) [0] cat [4*n^3-3*n^2-3*n+4: n in [2..40]]; // Vincenzo Librandi, Sep 23 2015
(PARI) a(n)=if(n>1, 4*n^3 - 3*n^2 - 3*n + 4, 0) \\ Charles R Greathouse IV, Oct 18 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 16 2017
STATUS
approved