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 A139011 #106 Dec 31 2023 10:30:28 %S A139011 1,2,3,2,-7,-38,-117,-278,-527,-718,-237,2642,11753,33802,76443, %T A139011 136762,164833,-24478,-922077,-3565918,-9653287,-20783558,-34867797, %U A139011 -35553398,32125393,306268562,1064447283,2726446322,5583548873,8701963882 %N A139011 Real part of (2 + i)^n, where i = sqrt(-1). %C A139011 Imaginary part of (2 + i)^n gives A099456. %C A139011 Irrespective of signs, odd-indexed terms of A006496 interleaved with even-indexed signs of A006495. %C A139011 Binomial transform of A146559, second binomial transform of A056594. - _Philippe Deléham_, Dec 02 2008 %H A139011 Seiichi Manyama, <a href="/A139011/b139011.txt">Table of n, a(n) for n = 0..2862</a> (first 201 terms from Vincenzo Librandi) %H A139011 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 A139011 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,-5). %F A139011 Real part of (2 + i)^n, i^2 = -1. %F A139011 Term (1,1) of matrix [2,-1; 1,2]^n. %F A139011 (a(n))^2 + (A099456(n))^2 = 5^n. %F A139011 From _R. J. Mathar_, Apr 06 2008: (Start) %F A139011 O.g.f.: (1-2x) /(1-4x+5x^2). %F A139011 a(n) = 4*a(n-1) - 5*a(n-2) = 2*A099456(n-1) - 5*A099456(n-2). (End) %F A139011 E.g.f.: exp(x)^2*cos(x). - _Zerinvary Lajos_, Apr 06 2009 %F A139011 a(-n) = a(n) / 5^n. - _Michael Somos_, Dec 26 2010 %F A139011 a(n) = Sum_{k=0..n} A098158(n,k)*2^(2k-n)*(-1)^(n-k). - _Philippe Deléham_, Dec 02 2008 %F A139011 2*a(n) - a(n+1) = A099456(n-1) for n>0. First differences are (up to sign) A118444. - _Paul Curtz_, Apr 25 2011 %F A139011 a(n) = Sum_{k=0..n} A201730(n,k)*(-2)^k. - _Philippe Deléham_, Dec 06 2011 %F A139011 a(n) = Sum_{k=0..floor(n/2)} (-1)^k*2^(n-2*k)*binomial(n,2*k). - _Gerry Martens_, Sep 18 2022 %e A139011 1 + 2*x + 3*x^2 + 2*x^3 - 7*x^4 - 38*x^5 - 117*x^6 - 278*x^7 - 527*x^8 + ... %e A139011 a(5) = -38 since (2 + i)^5 = (-38 + 41*i). %e A139011 a(5) = -38 since [2,-1; 1,2]^5 = [ -38,-41; 41,-38], where 41 = A099456(5). %e A139011 a(5) = -38 = A006496(5). %p A139011 restart: G(x):=exp(x)^2*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=1..29 ); # _Zerinvary Lajos_, Apr 06 2009 %t A139011 Re[(2+I)^Range[0,30]] (* or *) LinearRecurrence[{4,-5},{1,2},30] (* _Harvey P. Dale_, Nov 02 2022 *) %o A139011 (Sage) [lucas_number2(n,4,5)/2 for n in range(0,31)] # _Zerinvary Lajos_, Jul 08 2008 %o A139011 (PARI) a(n) = real((2 + I)^n) /* _Michael Somos_, Dec 26 2009 */ %o A139011 (PARI) Vec((1 - 2*x) / (1 - 4*x + 5*x^2) + O(x^30)) \\ _Colin Barker_, Sep 22 2017 %o A139011 (Magma) [ Integers()!Real((2+Sqrt(-1))^n): n in [0..29] ]; // _Bruno Berselli_, Apr 26 2011 %Y A139011 Cf. A099456, A006495, A006496, A056594, A146559 (inv bin. transf.). %K A139011 sign,easy %O A139011 0,2 %A A139011 _Gary W. Adamson_, Apr 05 2008 %E A139011 Cross-reference corrected by _Franklin T. Adams-Watters_, Jan 06 2009 %E A139011 Added a(0)=1 by _Michael Somos_, Dec 26 2010 %E A139011 Edited by _Franklin T. Adams-Watters_, Apr 10 2011