OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,9,-3).
FORMULA
a(n) = 5*a(n-1) - 10*a(n-2) + 9*a(n-3) - 3*a(n-4) for n > 3.
a(n) = 3*a(n-1) - 3*a(n-2) + n + 1, with a(-1) = a(-2) = 0.
a(n) = 4 + n + 3^(1+n/2)*(sqrt(3)*sin(n*Pi/6) - cos(n*Pi/6)). - Stefano Spezia, Feb 11 2023
PROG
(PARI) Vec(1/((1-x)^2*(1-3*x+3*x^2)) + O(x^30)) \\ Colin Barker, Dec 08 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Philippe Deléham, Dec 08 2016
EXTENSIONS
Incorrect term corrected by Colin Barker, Dec 09 2016
STATUS
approved