OFFSET
0,4
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,6).
FORMULA
G.f.: (1-2*x+x^2)/(1-3*x+3*x^2-6*x^3).
a(n) = 3*a(n-1)-3*a(n-2)+6*a(n-3).
a(n) = Sum{k=0..floor(n/3)} binomial(n, 3k)*5^k.
MATHEMATICA
Round@Table[((1 + 5^(1/3))^n + 2 (1 - 5^(1/3) + 5^(2/3))^(n/2) Cos[n/2 ArcCos[-(1 + 5^(2/3))/4]])/3, {n, 0, 20}] (* Vladimir Reshetnikov, Sep 19 2016 *)
LinearRecurrence[{3, -3, 6}, {1, 1, 1}, 30] (* Vincenzo Librandi, Sep 20 2016 *)
PROG
(PARI) Vec((1-2*x+x^2)/(1-3*x+3*x^2-6*x^3) + O(x^40)) \\ Michel Marcus, Sep 20 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 25 2004
STATUS
approved