login
A097124
Expansion of (1-x)^2/((1-x)^3-5x^3).
1
1, 1, 1, 6, 21, 51, 126, 351, 981, 2646, 7101, 19251, 52326, 141831, 384021, 1040526, 2820501, 7644051, 20713806, 56132271, 152119701, 412245126, 1117169901, 3027492531, 8204438646, 22233857751, 60253212501, 163284696126
OFFSET
0,4
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
Sequence in context: A341985 A341066 A263418 * A309568 A244906 A276072
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 25 2004
STATUS
approved