OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,0,1).
FORMULA
a(n) = Sum_{k=1..floor(n/3+1)} (-1)^k*binomial(n-k+3, 2*k). - Vladeta Jovovic, Feb 10 2003
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-4). - Chai Wah Wu, May 25 2016
MATHEMATICA
LinearRecurrence[{3, -3, 0, 1}, {1, 3, 6, 9}, 50] (* Vincenzo Librandi, May 27 2016 *)
PROG
(PARI) Vec((1-x)^(-1)/(1-2*x+x^2+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012
(Magma) I:=[1, 3, 6, 9]; [n le 4 select I[n] else 3*Self(n-1)-3*Self(n-2)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, May 27 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved