The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A052957 Expansion of 2*(1-x-x^2)/((1-2*x)*(1-2*x^2)). 2
2, 2, 6, 8, 20, 32, 72, 128, 272, 512, 1056, 2048, 4160, 8192, 16512, 32768, 65792, 131072, 262656, 524288, 1049600, 2097152, 4196352, 8388608, 16781312, 33554432, 67117056, 134217728, 268451840, 536870912, 1073774592, 2147483648 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
G.f.: 2*(1-x-x^2)/((1-2*x)*(1-2*x^2)).
a(n) = 2*a(n-1) + 2*a(n-2) - 4*a(n-3).
a(n) = 2^n + Sum_{alpha=RootOf(-1+2*x^2)} alpha^(-n)/2.
a(n) = 2*A051437(n+1), n > 0. - R. J. Mathar, Nov 27 2011
From Colin Barker, Sep 23 2016: (Start)
a(n) = 2^(n/2) + 2^n for n even.
a(n) = 2^n for n odd.
(End)
E.g.f.: (1/2)*(2*exp(2*x) + exp(-sqrt(2)*x) + exp(sqrt(2)*x)). - Stefano Spezia, Oct 22 2019
MAPLE
spec:= [S, {S=Union(Sequence(Prod(Union(Z, Z), Z)), Sequence(Union(Z, Z)))}, unlabeled ]: seq(combstruct[count ](spec, size=n), n=0..20);
seq(coeff(series(2*(1-x-x^2)/((1-2*x)*(1-2*x^2)), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Oct 22 2019
MATHEMATICA
CoefficientList[Series[2*(1-x-x^2)/((1-2*x)*(1-2*x^2)), {x, 0, 31}], x] (* Michael De Vlieger, Sep 23 2016 *)
Join[{2}, Table[2^n +2^((n-1)/2)*(1+(-1)^n)/Sqrt[2], {n, 30}]] (* G. C. Greubel, Oct 22 2019 *)
LinearRecurrence[{2, 2, -4}, {2, 2, 6}, 40] (* Harvey P. Dale, Jul 19 2020 *)
PROG
(PARI) a(n)=2^n+if(n%2, , 2^(n/2)) \\ Charles R Greathouse IV, Sep 23 2016
(Magma) [2] cat [Round(2^n +2^((n-1)/2)*(1+(-1)^n)/Sqrt(2)): n in [1..30]]; // G. C. Greubel, Oct 22 2019
(Sage) [2]+[2^n +2^((n-1)/2)*(1+(-1)^n)/sqrt(2) for n in (1..30)] # G. C. Greubel, Oct 22 2019
(GAP) a:=[2, 2, 6];; for n in [4..30] do a[n]:=2*a[n-1]+2*a[n-2]-4*a[n-3]; od; a; # G. C. Greubel, Oct 22 2019
CROSSREFS
Sequence in context: A370586 A276425 A129383 * A275441 A197465 A074933
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 May 23 09:59 EDT 2024. Contains 372760 sequences. (Running on oeis4.)