OFFSET
0,1
COMMENTS
First differences are in A004538.
a(n) is divisible by 11 for n = 3, 7, 9, 14, 18, 20, 25, 29, 31, 36, 40, ... with formula (1/3)*(11*m + (1 + (m mod 3))*(-1)^((m-1) mod 3) + 8), m >= 0.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Bruno Berselli, Table of similar sequences (row k=3, m>1).
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
O.g.f.: (-2 + 11*x - 4*x^2 + x^3)/(1 - x)^4.
E.g.f.: (-2 + 5*x + 6*x^2 + x^3)*exp(x).
a(n) = -A033445(-n-1).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n >= 5. - Wesley Ivan Hurt, Dec 18 2020
MAPLE
seq((n+2)*(n^2+n-1), n=0..43); # Paolo P. Lava, Sep 04 2018
MATHEMATICA
Table[(n + 2) (n^2 + n - 1), {n, 0, 50}]
PROG
(PARI) vector(50, n, n--; (n+2)*(n^2+n-1))
(Sage) [(n+2)*(n^2+n-1) for n in (0..50)]
(Maxima) makelist((n+2)*(n^2+n-1), n, 0, 50);
(GAP) List([0..50], n -> (n+2)*(n^2+n-1));
(Magma) [(n+2)*(n^2+n-1): n in [0..50]];
(Python) [(n+2)*(n**2+n-1) for n in range(50)]
(Julia) [(n+2)*(n^2+n-1) for n in 0:50] |> println
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Bruno Berselli, Sep 04 2018
STATUS
approved