|
|
A139011
|
|
Real part of (2 + i)^n, where i = sqrt(-1).
|
|
8
|
|
|
1, 2, 3, 2, -7, -38, -117, -278, -527, -718, -237, 2642, 11753, 33802, 76443, 136762, 164833, -24478, -922077, -3565918, -9653287, -20783558, -34867797, -35553398, 32125393, 306268562, 1064447283, 2726446322, 5583548873, 8701963882
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Imaginary part of (2 + i)^n gives A099456.
Irrespective of signs, odd-indexed terms of A006496 interleaved with even-indexed signs of A006495.
|
|
LINKS
|
|
|
FORMULA
|
Real part of (2 + i)^n, i^2 = -1.
Term (1,1) of matrix [2,-1; 1,2]^n.
O.g.f.: (1-2x) /(1-4x+5x^2).
a(n) = Sum_{k=0..floor(n/2)} (-1)^k*2^(n-2*k)*binomial(n,2*k). - Gerry Martens, Sep 18 2022
|
|
EXAMPLE
|
1 + 2*x + 3*x^2 + 2*x^3 - 7*x^4 - 38*x^5 - 117*x^6 - 278*x^7 - 527*x^8 + ...
a(5) = -38 since (2 + i)^5 = (-38 + 41*i).
a(5) = -38 since [2,-1; 1,2]^5 = [ -38,-41; 41,-38], where 41 = A099456(5).
|
|
MAPLE
|
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
|
|
MATHEMATICA
|
Re[(2+I)^Range[0, 30]] (* or *) LinearRecurrence[{4, -5}, {1, 2}, 30] (* Harvey P. Dale, Nov 02 2022 *)
|
|
PROG
|
(Sage) [lucas_number2(n, 4, 5)/2 for n in range(0, 31)] # Zerinvary Lajos, Jul 08 2008
(PARI) Vec((1 - 2*x) / (1 - 4*x + 5*x^2) + O(x^30)) \\ Colin Barker, Sep 22 2017
(Magma) [ Integers()!Real((2+Sqrt(-1))^n): n in [0..29] ]; // Bruno Berselli, Apr 26 2011
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|