A099094 a(n) = 3*a(n-2) + 3*a(n-3), a(0)=1, a(1)=0, a(2)=3.
1, 0, 3, 3, 9, 18, 36, 81, 162, 351, 729, 1539, 3240, 6804, 14337, 30132, 63423, 133407, 280665, 590490, 1242216, 2613465, 5498118, 11567043, 24334749, 51195483, 107705376, 226590696, 476702577, 1002888216, 2109879819, 4438772379
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,3,3).
Programs
-
Mathematica
CoefficientList[Series[1 / (1 - 3 x^2 - 3 x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 16 2015 *) LinearRecurrence[{0,3,3},{1,0,3},40] (* Harvey P. Dale, Aug 15 2017 *)
-
PARI
Vec(1/(1-3*x^2-3*x^3) + O(x^50)) \\ Michel Marcus, Jan 17 2015
Formula
G.f.: 1/(1 - 3*x^2 - 3*x^3).
a(n) = Sum_{k=0..floor(n/2)} binomial(k, n-2k)*3^k.
Construct the power matrix T(n,j) = [A(n)^*j]*[S(n)^*(j-1)] where A(n) = (0,3,3,0,0,...) and S(n) = (0,1,0,0,...). (* is convolution operation.) Define S^*0 = I. Then T(n,j) counts n-walks containing (j) loops, on the single vertex graph above, and a(n) = Sum_{j=1..n} T(n,j). - David Neil McGrath, Jan 16 2015
Extensions
Corrected by Philippe Deléham, Dec 18 2008
Comments