login
A052907
Expansion of 1/(1 - 2*x^2 - 2*x^3).
6
1, 0, 2, 2, 4, 8, 12, 24, 40, 72, 128, 224, 400, 704, 1248, 2208, 3904, 6912, 12224, 21632, 38272, 67712, 119808, 211968, 375040, 663552, 1174016, 2077184, 3675136, 6502400, 11504640, 20355072, 36014080, 63719424, 112738304, 199467008
OFFSET
0,3
COMMENTS
a(n) counts ordered walks of weight n on a single vertex graph containing 4 distinctly labeled loops of weights 2, 2, 3 and 3. - David Neil McGrath, Jan 16 2015
Number of compositions (ordered partitions) of n into parts 2 and 3, each of two sorts. - Joerg Arndt, Feb 14 2015
FORMULA
G.f.: 1/(1 - 2*x^2 - 2*x^3).
a(n) = 2*a(n-2) + 2*a(n-3), with a(0)=1, a(1)=0, a(2)=2.
a(n) = Sum_{alpha = RootOf(-1 + 2*z^2 + 2*z^3)} (-1/19)*(-3 - 5*alpha + 4*alpha^2)*alpha^(-1 - n).
a(n) = Sum_{k=0..floor(n/2)} binomial(k, n-2*k)*2^k. - Paul Barry, Oct 19 2004
Construct the matrix T with elements T(n,j) = [A^*j]*[S^*(j-1)](n) with the sequences A = (0,2,2,0,0...) and S = (0,1,0,0...) and the convolution operation *. Define S^*0 = I = (1, repeat(0)). Then T(n,j) for j>=1, counts closed n-walks containing j loops on the graph defined above in a comment, and a(n) = Sum_{j=1..n} T(n,j). - David Neil McGrath, Jan 16 2015
MAPLE
spec := [S, {S=Sequence(Prod(Union(Z, Z), Union(Z, Prod(Z, Z))))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
LinearRecurrence[{0, 2, 2}, {1, 0, 2}, 40] (* Harvey P. Dale, Oct 30 2011 *)
CoefficientList[Series[1/(1-2x^2-2x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 14 2015 *)
PROG
(Magma) I:=[1, 0, 2]; [n le 3 select I[n] else 2*Self(n-2)+2*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 14 2015
(PARI) my(x='x+O('x^40)); Vec(1/(1-2*x^2-2*x^3)) \\ G. C. Greubel, Oct 14 2019
(Sage)
def A052907_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 1/(1-2*x^2-2*x^3) ).list()
A052907_list(40) # G. C. Greubel, Oct 14 2019
(GAP) a:=[1, 0, 2];; for n in [4..40] do a[n]:=2*(a[n-2]+a[n-3]); od; a; # G. C. Greubel, Oct 14 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 36); Coefficients(R!( 1/(1 - 2*x^2 - 2*x^3))); // Marius A. Burtea, Oct 15 2019
CROSSREFS
Sequence in context: A329664 A153993 A244781 * A048114 A268691 A102456
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 05 2000
STATUS
approved