OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
From Bruno Berselli, Jul 27 2012: (Start)
G.f.: -x*(2-7*x-x^3)/(1-x)^4.
a(n) = A085490(n-1) + 2.
a(n) = A152619(n-2) - 1 for n>1.
a(n) - a(n-2) = A080859(n-2) - 1 for n>2. (End)
E.g.f.: 1 - (1-x)*(1+x)^2*exp(x). - G. C. Greubel, Dec 31 2023
MAPLE
MATHEMATICA
Table[n^3 - 2 n^2 - 1, {n, 50}] (* Vincenzo Librandi, Jul 29 2012 *)
PROG
(PARI) a(n)=n^3-2*n^2-1 \\ Charles R Greathouse IV, Jul 27 2012
(Magma) [n^3-2*n^2-1: n in [1..50]]; // Vincenzo Librandi, Jul 29 2012
(SageMath) [n^2*(n-2)-1 for n in range(1, 51)] # G. C. Greubel, Dec 31 2023
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Marco Piazzalunga, Jul 27 2012
EXTENSIONS
a(3) corrected by Charles R Greathouse IV, Jul 27 2012
STATUS
approved