login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Colin Barker, Table of n, a(n) for n = 0..1000

INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1028

Index entries for linear recurrences with constant coefficients, signature (2,2,-4).

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 *)

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: A000673 A276425 A129383 * A275441 A197465 A074933

Adjacent sequences:  A052954 A052955 A052956 * A052958 A052959 A052960

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 5 23:36 EDT 2020. Contains 335475 sequences. (Running on oeis4.)