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!)
A146559 Expansion of (1-x)/(1 - 2*x + 2*x^2). 36

%I #124 Feb 16 2024 11:24:49

%S 1,1,0,-2,-4,-4,0,8,16,16,0,-32,-64,-64,0,128,256,256,0,-512,-1024,

%T -1024,0,2048,4096,4096,0,-8192,-16384,-16384,0,32768,65536,65536,0,

%U -131072,-262144,-262144,0,524288,1048576,1048576,0,-2097152,-4194304

%N Expansion of (1-x)/(1 - 2*x + 2*x^2).

%C Partial sums of this sequence give A099087. - _Philippe Deléham_, Dec 01 2008

%C From _Philippe Deléham_, Feb 13 2013, Feb 20 2013: (Start)

%C Terms of the sequence lie along the right edge of the triangle

%C (1)

%C (1)

%C 2 (0)

%C 2 (-2)

%C 4 0 (-4)

%C 4 -4 (-4)

%C 8 0 -8 (0)

%C 8 -8 -8 (8)

%C 16 0 -16 0 (16)

%C 16 -16 -16 16 (16)

%C 32 0 -32 0 32 (0)

%C 32 -32 -32 32 32 (-32)

%C 64 0 -64 0 64 0 (-64)

%C ...

%C Row sums of triangle are in A104597.

%C (1+i)^n = a(n) + A009545(n)*i where i = sqrt(-1). (End)

%C From _Tom Copeland_, Nov 08 2014: (Start)

%C This array is a member of a Catalan family (A091867) related by compositions of C(x)= (1-sqrt(1-4*x))/2, an o.g.f. for the Catalan numbers A000108, its inverse Cinv(x) = x(1-x), and the special linear fractional (Möbius) transformation P(x,t) = x / (1+t*x) with inverse P(x,-t) in x.

%C O.g.f.: G(x) = P[P[Cinv(x),-1],-1] = P[Cinv(x),-2] = x*(1-x)/(1 - 2*x*(1-x)) = x*A146599(x).

%C Ginv(x) = C[P(x,2)] = (1 - sqrt(1-4*x/(1+2*x)))/2 = x*A126930(x).

%C G(-x) = -(x*(1+x) - 2*(x*(1+x))^2 + 2^2*(x*(1+x))^3 - ...), and so this array contains the -row sums of A030528 * Diag(1, (-2)^1, 2^2, (-2)^3, ...).

%C The inverse of -G(-x) is -C[-P(x,-2)]= (-1 + sqrt(1+4*x/(1-2*x)))/2, an o.g.f. for A210736 with a(0) set to zero there. (End)

%C {A146559, A009545} is the difference analog of {cos(x), sin(x)}. (Cf. the Shevelev link.) - _Vladimir Shevelev_, Jun 08 2017

%H Harvey P. Dale, <a href="/A146559/b146559.txt">Table of n, a(n) for n = 0..1000</a>

%H Beata Bajorska-Harapińska, Barbara Smoleń and Roman Wituła, <a href="https://doi.org/10.1007/s00006-019-0969-9">On Quaternion Equivalents for Quasi-Fibonacci Numbers, Shortly Quaternaccis</a>, Advances in Applied Clifford Algebras (2019) Vol. 29, 54.

%H John B. Dobson, <a href="http://arxiv.org/abs/1610.09361">A matrix variation on Ramus's identity for lacunary sums of binomial coefficients</a>, arXiv preprint arXiv:1610.09361 [math.NT], 2016.

%H Vladimir Shevelev, <a href="https://arxiv.org/abs/1706.01454">Combinatorial identities generated by difference analogs of hyperbolic and trigonometric functions of order n</a>, arXiv:1706.01454 [math.CO], 2017.

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2).

%F a(0) = 1, a(1) = 1, a(n) = 2*a(n-1) - 2*a(n-2) for n>1.

%F a(n) = Sum_{k=0..n} A124182(n,k)*(-2)^(n-k).

%F a(n) = Sum_{k=0..n} A098158(n,k)*(-1)^(n-k). - _Philippe Deléham_, Nov 14 2008

%F a(n) = (-1)^n*A009116(n). - _Philippe Deléham_, Dec 01 2008

%F E.g.f.: exp(x)*cos(x). - _Zerinvary Lajos_, Apr 05 2009

%F E.g.f.: cos(x)*exp(x) = 1+x/(G(0)-x) where G(k)=4*k+1+x+(x^2)*(4*k+1)/((2*k+1)*(4*k+3)-(x^2)-x*(2*k+1)*(4*k+3)/( 2*k+2+x-x*(2*k+2)/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, Nov 26 2011

%F a(n) = Re( (1+i)^n ) where i=sqrt(-1). - _Stanislav Sykora_, Jun 11 2012

%F G.f.: 1 / (1 - x / (1 + x / (1 - 2*x))) = 1 + x / (1 + 2*x^2 / (1 - 2*x)). - _Michael Somos_, Jan 03 2013

%F G.f.: G(0)/2, where G(k)= 1 + 1/(1 - x*(k+1)/(x*(k+2) + 1/G(k+1))); (continued fraction). - _Sergei N. Gladkovskii_, May 25 2013

%F a(m+k) = a(m)*a(k) - A009545(m)*A009545(k). - _Vladimir Shevelev_, Jun 08 2017

%F a(n) = 2^(n/2)*cos(Pi*n/4). - _Peter Luschny_, Oct 09 2021

%F a(n) = 2^(n/2)*ChebyshevT(n, 1/sqrt(2)). - _G. C. Greubel_, Apr 17 2023

%F From _Chai Wah Wu_, Feb 15 2024: (Start)

%F a(n) = Sum_{n=0..floor(n/2)} binomial(n,2j)*(-1)^j = A121625(n)/n^n.

%F a(n) = 0 if and only if n == 2 mod 4.

%F (End)

%e G.f. = 1 + x - 2*x^3 - 4*x^4 - 4*x^5 + 8*x^7 + 16*x^8 + 16*x^9 - 32*x^11 - 64*x^12 - ...

%p G(x):=exp(x)*cos(x): f[0]:=G(x): for n from 1 to 54 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..44 ); # _Zerinvary Lajos_, Apr 05 2009

%p seq(2^(n/2)*cos(Pi*n/4), n=0..44); # _Peter Luschny_, Oct 09 2021

%t CoefficientList[Series[(1-x)/(1-2x+2x^2),{x,0,50}],x] (* or *) LinearRecurrence[{2,-2},{1,1},50] (* _Harvey P. Dale_, Oct 13 2011 *)

%o (PARI) Vec((1-x)/(1-2*x+2*x^2)+O(x^99)) \\ _Charles R Greathouse IV_, Jan 11 2012

%o (Sage)

%o def A146559():

%o x, y = -1, 0

%o while True:

%o yield -x

%o x, y = x - y, x + y

%o a = A146559(); [next(a) for i in range(51)] # _Peter Luschny_, Jul 11 2013

%o (Magma) I:=[1,1,0]; [n le 3 select I[n] else 2*Self(n-1)-2*Self(n-2): n in [1..45]]; // _Vincenzo Librandi_, Nov 10 2014

%o (SageMath)

%o def A146559(n): return 2^(n/2)*chebyshev_T(n, 1/sqrt(2))

%o [A146559(n) for n in range(51)] # _G. C. Greubel_, Apr 17 2023

%o (Python)

%o def A146559(n): return ((1, 1, 0, -2)[n&3]<<((n>>1)&-2))*(-1 if n&4 else 1) # _Chai Wah Wu_, Feb 16 2024

%Y Cf. A000108, A009116, A009545, A030528, A091867, A098158, A099087.

%Y Cf. A104597, A124182, A126930, A121625, A146559, A146599, A210736.

%K sign,easy

%O 0,4

%A _Philippe Deléham_, Nov 01 2008

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 23 19:56 EDT 2024. Contains 371916 sequences. (Running on oeis4.)