This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A146559 #128 May 07 2025 09:41:01 %S A146559 1,1,0,-2,-4,-4,0,8,16,16,0,-32,-64,-64,0,128,256,256,0,-512,-1024, %T A146559 -1024,0,2048,4096,4096,0,-8192,-16384,-16384,0,32768,65536,65536,0, %U A146559 -131072,-262144,-262144,0,524288,1048576,1048576,0,-2097152,-4194304 %N A146559 Expansion of (1-x)/(1 - 2*x + 2*x^2). %C A146559 Partial sums of this sequence give A099087. - _Philippe Deléham_, Dec 01 2008 %C A146559 From _Philippe Deléham_, Feb 13 2013, Feb 20 2013: (Start) %C A146559 Terms of the sequence lie along the right edge of the triangle %C A146559 (1) %C A146559 (1) %C A146559 2 (0) %C A146559 2 (-2) %C A146559 4 0 (-4) %C A146559 4 -4 (-4) %C A146559 8 0 -8 (0) %C A146559 8 -8 -8 (8) %C A146559 16 0 -16 0 (16) %C A146559 16 -16 -16 16 (16) %C A146559 32 0 -32 0 32 (0) %C A146559 32 -32 -32 32 32 (-32) %C A146559 64 0 -64 0 64 0 (-64) %C A146559 ... %C A146559 Row sums of triangle are in A104597. %C A146559 (1+i)^n = a(n) + A009545(n)*i where i = sqrt(-1). (End) %C A146559 From _Tom Copeland_, Nov 08 2014: (Start) %C A146559 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 A146559 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 A146559 Ginv(x) = C[P(x,2)] = (1 - sqrt(1-4*x/(1+2*x)))/2 = x*A126930(x). %C A146559 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 A146559 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 {A146559, A009545} is the difference analog of {cos(x), sin(x)}. (Cf. the Shevelev link.) - _Vladimir Shevelev_, Jun 08 2017 %H A146559 Harvey P. Dale, <a href="/A146559/b146559.txt">Table of n, a(n) for n = 0..1000</a> %H A146559 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 A146559 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 A146559 Yassine Otmani, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL28/Otmani/otmani10.html">The 2-Pascal Triangle and a Related Riordan Array</a>, J. Int. Seq. (2025) Vol. 28, Issue 3, Art. No. 25.3.5. See p. 21. %H A146559 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 A146559 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2). %F A146559 a(0) = 1, a(1) = 1, a(n) = 2*a(n-1) - 2*a(n-2) for n>1. %F A146559 a(n) = Sum_{k=0..n} A124182(n,k)*(-2)^(n-k). %F A146559 a(n) = Sum_{k=0..n} A098158(n,k)*(-1)^(n-k). - _Philippe Deléham_, Nov 14 2008 %F A146559 a(n) = (-1)^n*A009116(n). - _Philippe Deléham_, Dec 01 2008 %F A146559 E.g.f.: exp(x)*cos(x). - _Zerinvary Lajos_, Apr 05 2009 %F A146559 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 A146559 a(n) = Re( (1+i)^n ) where i=sqrt(-1). - _Stanislav Sykora_, Jun 11 2012 %F A146559 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 A146559 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 A146559 a(m+k) = a(m)*a(k) - A009545(m)*A009545(k). - _Vladimir Shevelev_, Jun 08 2017 %F A146559 a(n) = 2^(n/2)*cos(Pi*n/4). - _Peter Luschny_, Oct 09 2021 %F A146559 a(n) = 2^(n/2)*ChebyshevT(n, 1/sqrt(2)). - _G. C. Greubel_, Apr 17 2023 %F A146559 From _Chai Wah Wu_, Feb 15 2024: (Start) %F A146559 a(n) = Sum_{n=0..floor(n/2)} binomial(n,2j)*(-1)^j = A121625(n)/n^n. %F A146559 a(n) = 0 if and only if n == 2 mod 4. %F A146559 (End) %e A146559 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 A146559 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 A146559 seq(2^(n/2)*cos(Pi*n/4), n=0..44); # _Peter Luschny_, Oct 09 2021 %t A146559 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 A146559 (PARI) Vec((1-x)/(1-2*x+2*x^2)+O(x^99)) \\ _Charles R Greathouse IV_, Jan 11 2012 %o A146559 (Sage) %o A146559 def A146559(): %o A146559 x, y = -1, 0 %o A146559 while True: %o A146559 yield -x %o A146559 x, y = x - y, x + y %o A146559 a = A146559(); [next(a) for i in range(51)] # _Peter Luschny_, Jul 11 2013 %o A146559 (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 A146559 (SageMath) %o A146559 def A146559(n): return 2^(n/2)*chebyshev_T(n, 1/sqrt(2)) %o A146559 [A146559(n) for n in range(51)] # _G. C. Greubel_, Apr 17 2023 %o A146559 (Python) %o A146559 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 A146559 Cf. A000108, A009116, A009545, A030528, A091867, A098158, A099087. %Y A146559 Cf. A104597, A124182, A126930, A121625, A146559, A146599, A210736. %K A146559 sign,easy %O A146559 0,4 %A A146559 _Philippe Deléham_, Nov 01 2008