A167682 Expansion of (1 - 2*x + 5*x^2) / (1 - 3*x)^2.
1, 4, 20, 84, 324, 1188, 4212, 14580, 49572, 166212, 551124, 1810836, 5904900, 19131876, 61647156, 197696052, 631351908, 2008846980, 6370914708, 20145865428, 63536960196, 199908972324, 627621192180, 1966546402164, 6150687683364, 19205208480708
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (6,-9).
Programs
-
Mathematica
CoefficientList[Series[(1-2x+5*x^2)/(1-3x)^2,{x,0,40}],x] (* or *) Join[{1},LinearRecurrence[{6,-9},{4,20},40]] (* Harvey P. Dale, Oct 20 2011 *)
-
PARI
Vec((1-2*x+5*x^2) / (1-3*x)^2 + O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
Formula
a(0)=1, a(1)=4, a(2)=20, a(n) = 6*a(n-1) - 9*a(n-2) for n>2.
a(n) = 4*A081038(n-1) for n>0.
a(n) = Sum_{k=0..n} A167666(n,k)*3^k.
a(n) = 3^(n - 2)*(8*n + 4) for n>0. - Colin Barker, Jan 21 2017
Extensions
Corrected and extended by Harvey P. Dale, Oct 20 2011
PARI code corrected by Colin Barker, Jan 21 2017