OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,20,27,-14,-25,4,5,-1).
FORMULA
a(n) = a(n-1) + 20*a(n-2) + 27*a(n-3) - 14*a(n-4) - 25*a(n-5) + 4*a(n-6) + 5*a(n-7) - a(n-8).
G.f.: (8 -7*x -120*x^2 -135*x^3 +56*x^4 +75*x^5 -8*x^6 -5*x^7)/((1+x)*(1+2*x-x^2)*(1-4*x-9*x^2+5*x^3+4*x^4-x^5)). - Colin Barker, Aug 31 2012
MAPLE
seq(coeff(series((8 -7*x -120*x^2 -135*x^3 +56*x^4 +75*x^5 -8*x^6 -5*x^7)/( (1+x)*(1+2*x-x^2)*(1-4*x-9*x^2+5*x^3+4*x^4-x^5)), x, n+1), x, n), n = 0 ..30); # G. C. Greubel, Oct 30 2019
MATHEMATICA
CoefficientList[Series[(8-7*x-120*x^2-135*x^3+56*x^4+75*x^5-8*x^6-5*x^7) /( (1+x)*(1+2*x-x^2)*(1-4*x-9*x^2+5*x^3+4*x^4-x^5)), {x, 0, 50}], x] (* Vincenzo Librandi, May 11 2017 *)
PROG
(Magma) I:=[8, 1, 41, 142, 933, 4741, 26660, 143697]; [n le 8 select I[n] else Self(n-1)+20*Self(n-2)+27*Self(n-3)-14*Self(n-4)- 25*Self(n-5)+4*Self(n-6)+5*Self(n-7)-Self(n-8): n in [1..30]]; // Vincenzo Librandi, May 11 2017
(PARI) my(x='x+O('x^30)); Vec((8 -7*x -120*x^2 -135*x^3 +56*x^4 +75*x^5 -8*x^6 -5*x^7)/((1+x)*(1+2*x-x^2)*(1-4*x-9*x^2+5*x^3+4*x^4-x^5))) \\ G. C. Greubel, Oct 30 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (8 -7*x -120*x^2 -135*x^3 +56*x^4 +75*x^5 -8*x^6 -5*x^7)/((1+x)*(1+2*x-x^2)*( 1-4*x-9*x^2+5*x^3+4*x^4-x^5)) )); // G. C. Greubel, Oct 30 2019
(Sage)
def A050401_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((8 -7*x -120*x^2 -135*x^3 +56*x^4 +75*x^5 -8*x^6 -5*x^7)/((1+x)*(1+2*x-x^2)*(1-4*x-9*x^2+5*x^3+4*x^4-x^5))).list()
A050401_list(30) # G. C. Greubel, Oct 30 2019
(GAP) a:=[8, 1, 41, 142, 933, 4741, 26660, 143697];; for n in [9..30] do a[n]:= a[n-1]+20*a[n-2]+27*a[n-3]-14*a[n-4]-25*a[n-5]+4*a[n-6]+5*a[n-7]-a[n-8]; od; a; # G. C. Greubel, Oct 30 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Stephen G Penrice, Dec 21 1999
EXTENSIONS
More terms from Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999
STATUS
approved