OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
N. J. A. Sloane, Transforms
Index entries for linear recurrences with constant coefficients, signature (4,-7,6,-3,2).
FORMULA
a(n) = 4*a(n-1) - 7*a(n-2) + 6*a(n-3) - 3*a(n-4) + 2*a(n-5), a(0)=5, a(1)=4, a(2)=2, a(3)=-2, a(4)=-10.
G.f.: (5 -16*x +21*x^2 -12*x^3 +3*x^4)/(1 -4*x +7*x^2 -6*x^3 +3*x^4 -2*x^5).
MATHEMATICA
CoefficientList[Series[(5-16x+21x^2-12x^3+3x^4)/(1-4x+7x^2-6x^3+3x^4-2x^5), {x, 0, 40}], x]
LinearRecurrence[{4, -7, 6, -3, 2}, {5, 4, 2, -2, -10}, 40] (* Harvey P. Dale, Nov 29 2019 *)
PROG
(Magma) I:=[5, 4, 2, -2, -10]; [n le 5 select I[n] else 4*Self(n-1) -7*Self(n-2) +6*Self(n-3) -3*Self(n-4) +2*Self(n-5): n in [1..51]]; // G. C. Greubel, Jul 05 2021
(Sage)
def A074825_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (5-16*x+21*x^2-12*x^3+3*x^4)/(1-4*x+7*x^2-6*x^3+3*x^4-2*x^5) ).list()
A074825_list(50) # G. C. Greubel, Jul 05 2021
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Sep 09 2002
STATUS
approved