login
A141527
Expansion of x*(2 + x)/(1 + x + 41*x^2).
2
2, -1, -81, 122, 3199, -8201, -122958, 459199, 4582079, -23409238, -164456001, 1124234759, 5618461282, -51712086401, -178644826161, 2298840368602, 5025597503999, -99278052616681, -106771445047278, 4177171602331199, 200457644607199, -171464493340186358
OFFSET
1,1
FORMULA
a(n) = (-1)^n*(p^n + q^n), where p = (1 +sqrt(163)*i)/2 and q = (1 -sqrt(163)*i)/2.
From Colin Barker, Mar 17 2013: (Start)
a(n) = -a(n-1) -41*a(n-2), with a(0) = 2 and a(1) = -1.
G.f.: x*(2+x)/(1 +x +41*x^2). (End)
MATHEMATICA
(* First program *)
p:= (1 +Sqrt[163]*I)/2; q:= (1 -Sqrt[163]*I)/2; f[n_]:= (-1)^n*(p^n + q^n); Table[Simplify[f[n]], {n, 0, 30}] (* modified by G. C. Greubel, Mar 29 2021 *)
(* Second program *)
LinearRecurrence[{-1, -41}, {2, -1}, 30] (* Harvey P. Dale, Sep 04 2015 *)
PROG
(Magma)
R<x>:=PowerSeriesRing(Rationals(), 30);
Coefficients(R!( x*(2+x)/(1+x+41*x^2) )); // G. C. Greubel, Mar 29 2021
(Sage)
def A141527_list(prec):
P.<x> = PowerSeriesRing(QQ, prec)
return P( x*(2+x)/(1+x+41*x^2) ).list()
a=A141527_list(31); a[1:] # G. C. Greubel, Mar 29 2021
CROSSREFS
Sequence in context: A095837 A095835 A147805 * A301631 A191298 A104025
KEYWORD
sign,easy
AUTHOR
Roger L. Bagula, Aug 11 2008
EXTENSIONS
New name from Colin Barker and Joerg Arndt, Mar 17 2013
STATUS
approved