|
|
A099087
|
|
Expansion of 1/(1 - 2*x + 2*x^2).
|
|
21
|
|
|
1, 2, 2, 0, -4, -8, -8, 0, 16, 32, 32, 0, -64, -128, -128, 0, 256, 512, 512, 0, -1024, -2048, -2048, 0, 4096, 8192, 8192, 0, -16384, -32768, -32768, 0, 65536, 131072, 131072, 0, -262144, -524288, -524288, 0, 1048576, 2097152, 2097152, 0, -4194304, -8388608, -8388608, 0, 16777216
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Row sums of Krawtchouk triangle A098593. Partial sums of e.g.f. exp(x)cos(x), or 2^(n/2)cos(Pi*n/2). See A009116.
Pisano period lengths: 1, 1, 8, 1, 4, 8, 24, 1, 24, 4, 40, 8, 12, 24, 8, 1, 16, 24, 72, 4, ... - R. J. Mathar, Aug 10 2012
|
|
LINKS
|
|
|
FORMULA
|
E.g.f.: exp(x)*(cos(x) + sin(x)).
a(n) = 2^(n/2)*(cos(Pi*n/4) + sin(Pi*n/4)).
a(n) = Sum_{k=0..n} Sum_{i=0..k} binomial(n-k, k-i)*binomial(n, i) *(-1)^(k-i).
a(n) = 2*(a(n-1) - a(n-2)).
a(n) = (1-i)^(n-1) + (1+i)^(n-1) where i=sqrt(-1).
a(n) = 2 Sum_{k=0..(n-1)/2} (-1)^k*binomial(n-1,2k) if n>0. (End)
E.g.f.: (cos(x)+sin(x))*exp(x) = G(0); G(k)=1+2*x/(4*k+1-x*(4*k+1)/(2*(2*k+1)+x-2*(x^2)*(2*k+1)/((x^2)-(2*k+2)*(4*k+3)/G(k+1)))); (continued fraction). - Sergei N. Gladkovskii, Nov 26 2011
G.f.: U(0) where U(k)= 1 + x*(k+3) - x*(k+1)/U(k+1) ; (continued fraction, 1-step). - Sergei N. Gladkovskii, Oct 10 2012
a(n) = Sum_{j=0..n} binomial(n, j)*(-1)^binomial(j, 2); this is the case m=2 and z=-1 of f(m,n)(z) = Sum_{j=0..n} binomial(n, j)*z^binomial(j, m). See Dilcher and Ulas. - Michel Marcus, Sep 01 2020
|
|
MATHEMATICA
|
CoefficientList[Series[1/(1 -2x +2x^2), {x, 0, 50}], x] (* Michael De Vlieger, Dec 24 2015 *)
|
|
PROG
|
(Sage) [lucas_number1(n, 2, 2) for n in range(1, 50)] # Zerinvary Lajos, Apr 23 2009
(PARI) x='x+O('x^50); Vec(1/(1-2*x+2*x^2)) \\ Altug Alkan, Dec 24 2015
(Magma) I:=[1, 2]; [n le 2 select I[n] else 2*(Self(n-1) - Self(n-2)): n in [1..50]]; // G. C. Greubel, Mar 16 2019
(GAP) a:=[1, 2];; for n in [3..50] do a[n]:=2*a[n-1]-2*a[n-2]; od; a; # G. C. Greubel, Mar 16 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,sign
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|