|
|
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^(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
|
(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
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|