A146559 Expansion of (1-x)/(1 - 2*x + 2*x^2).
1, 1, 0, -2, -4, -4, 0, 8, 16, 16, 0, -32, -64, -64, 0, 128, 256, 256, 0, -512, -1024, -1024, 0, 2048, 4096, 4096, 0, -8192, -16384, -16384, 0, 32768, 65536, 65536, 0, -131072, -262144, -262144, 0, 524288, 1048576, 1048576, 0, -2097152, -4194304
Offset: 0
Examples
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 - ...
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- Beata Bajorska-Harapińska, Barbara Smoleń and Roman Wituła, On Quaternion Equivalents for Quasi-Fibonacci Numbers, Shortly Quaternaccis, Advances in Applied Clifford Algebras (2019) Vol. 29, 54.
- John B. Dobson, A matrix variation on Ramus's identity for lacunary sums of binomial coefficients, arXiv preprint arXiv:1610.09361 [math.NT], 2016.
- Yassine Otmani, The 2-Pascal Triangle and a Related Riordan Array, J. Int. Seq. (2025) Vol. 28, Issue 3, Art. No. 25.3.5. See p. 21.
- Vladimir Shevelev, Combinatorial identities generated by difference analogs of hyperbolic and trigonometric functions of order n, arXiv:1706.01454 [math.CO], 2017.
- Index entries for linear recurrences with constant coefficients, signature (2,-2).
Crossrefs
Programs
-
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
-
Maple
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 seq(2^(n/2)*cos(Pi*n/4), n=0..44); # Peter Luschny, Oct 09 2021
-
Mathematica
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 *)
-
PARI
Vec((1-x)/(1-2*x+2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Jan 11 2012
-
Python
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
-
Sage
def A146559(): x, y = -1, 0 while True: yield -x x, y = x - y, x + y a = A146559(); [next(a) for i in range(51)] # Peter Luschny, Jul 11 2013
-
SageMath
def A146559(n): return 2^(n/2)*chebyshev_T(n, 1/sqrt(2)) [A146559(n) for n in range(51)] # G. C. Greubel, Apr 17 2023
Formula
a(0) = 1, a(1) = 1, a(n) = 2*a(n-1) - 2*a(n-2) for n>1.
a(n) = Sum_{k=0..n} A124182(n,k)*(-2)^(n-k).
a(n) = Sum_{k=0..n} A098158(n,k)*(-1)^(n-k). - Philippe Deléham, Nov 14 2008
a(n) = (-1)^n*A009116(n). - Philippe Deléham, Dec 01 2008
E.g.f.: exp(x)*cos(x). - Zerinvary Lajos, Apr 05 2009
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
a(n) = Re( (1+i)^n ) where i=sqrt(-1). - Stanislav Sykora, Jun 11 2012
G.f.: 1 / (1 - x / (1 + x / (1 - 2*x))) = 1 + x / (1 + 2*x^2 / (1 - 2*x)). - Michael Somos, Jan 03 2013
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
a(n) = 2^(n/2)*cos(Pi*n/4). - Peter Luschny, Oct 09 2021
a(n) = 2^(n/2)*ChebyshevT(n, 1/sqrt(2)). - G. C. Greubel, Apr 17 2023
From Chai Wah Wu, Feb 15 2024: (Start)
a(n) = Sum_{n=0..floor(n/2)} binomial(n,2j)*(-1)^j = A121625(n)/n^n.
a(n) = 0 if and only if n == 2 mod 4.
(End)
Comments