login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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.
a(n) = 2*A033138(n+1) - 2*A033138(n) - A033138(n-2). - R. J. Mathar, Nov 28 2011
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)
def A052935_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((2-2*x-x^3)/((1-2*x)*(1-x^3))).list()
A052935_list(40) # G. C. Greubel, Oct 18 2019
(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
Sequence in context: A054230 A054232 A100048 * A365091 A246789 A166022
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from James A. Sellers, Jun 05 2000
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 08:09 EDT 2024. Contains 371922 sequences. (Running on oeis4.)