|
|
A052935
|
|
Expansion of (2-2*x-x^3)/((1-2*x)*(1-x^3)).
|
|
1
|
|
|
2, 2, 4, 9, 16, 32, 65, 128, 256, 513, 1024, 2048, 4097, 8192, 16384, 32769, 65536, 131072, 262145, 524288, 1048576, 2097153, 4194304, 8388608, 16777217, 33554432, 67108864, 134217729, 268435456, 536870912, 1073741825, 2147483648
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (2-2*x-x^3)/((1-x^3)*(1-2*x)).
a(n) = a(n-1) + a(n-2) + 2*a(n-3) - 1.
a(n) = 2^n + Sum_{alpha=RootOf(-1+z^3)} alpha^(-n)/3.
|
|
MAPLE
|
spec:= [S, {S=Union(Sequence(Prod(Z, Z, Z)), Sequence(Union(Z, Z)))}, unlabeled ]: seq(combstruct[count ](spec, size=n), n=0..20);
seq(coeff(series((2-2*x-x^3)/((1-2*x)*(1-x^3)), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Oct 18 2019
|
|
MATHEMATICA
|
CoefficientList[Series[(2-2*x-x^3)/((1-2*x)*(1-x^3)), {x, 0, 40}], x] (* G. C. Greubel, Oct 05 2017 *)
LinearRecurrence[{2, 0, 1, -2}, {2, 2, 4, 9}, 40] (* G. C. Greubel, Oct 18 2019 *)
|
|
PROG
|
(PARI) my(x='x+O('x^40)); Vec((2-2*x-x^3)/((1-2*x)*(1-x^3))) \\ G. C. Greubel, Oct 05 2017
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-2*x-x^3)/((1-2*x)*(1-x^3)) )); // G. C. Greubel, Oct 18 2019
(Sage)
P.<x> = PowerSeriesRing(ZZ, prec)
return P((2-2*x-x^3)/((1-2*x)*(1-x^3))).list()
(GAP) a:=[2, 2, 4, 9];; for n in [5..40] do a[n]:=2*a[n-1]+a[n-3]-2*a[n-4]; od; a; # G. C. Greubel, Oct 18 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|