login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A146559
Expansion of (1-x)/(1 - 2*x + 2*x^2).
37
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,4
COMMENTS
Partial sums of this sequence give A099087. - Philippe Deléham, Dec 01 2008
From Philippe Deléham, Feb 13 2013, Feb 20 2013: (Start)
Terms of the sequence lie along the right edge of the triangle
(1)
(1)
2 (0)
2 (-2)
4 0 (-4)
4 -4 (-4)
8 0 -8 (0)
8 -8 -8 (8)
16 0 -16 0 (16)
16 -16 -16 16 (16)
32 0 -32 0 32 (0)
32 -32 -32 32 32 (-32)
64 0 -64 0 64 0 (-64)
...
Row sums of triangle are in A104597.
(1+i)^n = a(n) + A009545(n)*i where i = sqrt(-1). (End)
From Tom Copeland, Nov 08 2014: (Start)
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.
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).
Ginv(x) = C[P(x,2)] = (1 - sqrt(1-4*x/(1+2*x)))/2 = x*A126930(x).
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, ...).
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)
{A146559, A009545} is the difference analog of {cos(x), sin(x)}. (Cf. the Shevelev link.) - Vladimir Shevelev, Jun 08 2017
LINKS
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.
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(m+k) = a(m)*a(k) - A009545(m)*A009545(k). - Vladimir Shevelev, Jun 08 2017
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)
EXAMPLE
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 - ...
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 *)
PROG
(PARI) Vec((1-x)/(1-2*x+2*x^2)+O(x^99)) \\ Charles R Greathouse IV, Jan 11 2012
(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
(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
(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
(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
KEYWORD
sign,easy
AUTHOR
Philippe Deléham, Nov 01 2008
STATUS
approved