|
|
A052538
|
|
Expansion of (1-x)/(1-2*x-3*x^2+3*x^3).
|
|
2
|
|
|
1, 1, 5, 10, 32, 79, 224, 589, 1613, 4321, 11714, 31552, 85283, 230080, 621353, 1677097, 4528013, 12223258, 32999264, 89084263, 240496544, 649248085, 1752733013, 4731720649, 12773896082, 34484755072, 93096036443
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1-x)/(1 - 2*x - 3*x^2 + 3*x^3)
a(n) = 2*a(n-1) + 3*a(n-2) - 3*a(n-3), with a(0)=1, a(1)=1, a(2)=5.
a(n) = Sum_{alpha = RootOf(1-2*x-3*x^2+3*x^3)} (1/107)*(13 + 38*alpha +33*alpha^2)*alpha^(-n-1).
|
|
MAPLE
|
spec := [S, {S=Sequence(Prod(Z, Union(Z, Z, Z, Sequence(Z))))}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
|
|
MATHEMATICA
|
CoefficientList[Series[(1-x)/(1-2*x-3*x^2+3*x^3), {x, 0, 30}], x] (* or *) LinearRecurrence[{2, 3, -3}, {1, 1, 5}, 30] (* G. C. Greubel, May 09 2019 *)
|
|
PROG
|
(PARI) my(x='x+O('x^30)); Vec((1-x)/(1-2*x-3*x^2+3*x^3)) \\ G. C. Greubel, May 09 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1 -2*x-3*x^2+3*x^3) )); // G. C. Greubel, May 09 2019
(Sage) ((1-x)/(1-2*x-3*x^2+3*x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, May 09 2019
(GAP) a:=[1, 1, 5];; for n in [4..30] do a[n]:=2*a[n-1]+3*a[n-2]-3*a[n-3]; od; a; # G. C. Greubel, May 09 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|