OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (2,7,-7,-12,2).
FORMULA
From R. J. Mathar, Apr 04 2009: (Start)
a(n) = 2*a(n-1) + 7*a(n-2) - 7*a(n-3) - 12*a(n-4) + 2*a(n-5).
G.f.: x^2*(43 -11*x -148*x^2 +23*x^3)/(1 -2*x -7*x^2 +7*x^3 +12*x^4 -2*x^5). (End)
MATHEMATICA
M = {{0, 1, 0, 0, 1, 1, 0, 0, 0, 1}, {1, 0, 1, 0, 0, 1, 1, 0, 0, 0}, {0, 1, 0, 1, 0, 0, 1, 1, 0, 0}, {0, 0, 1, 0, 1, 0, 0, 0, 1, 0}, {1, 0, 0, 1, 0, 0, 0, 0, 1, 1}, {1, 1, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, {1, 0, 0, 0, 1, 0, 0, 0, 0, 0}};
v[1]= Table[Fibonacci[n], {n, 0, 9}]; v[n_]:= v[n]= M.v[n-1];
Table[Floor[v[n][[1]]], {n, 1, 50}]
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); [0] cat Coefficients(R!( x^2*(43 -11*x -148*x^2 +23*x^3)/(1 -2*x -7*x^2 +7*x^3 +12*x^4 -2*x^5) )); // G. C. Greubel, Jul 12 2021
(Sage)
def A121957_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( x^2*(43-11*x-148*x^2+23*x^3)/(1-2*x-7*x^2+7*x^3+12*x^4 -2*x^5) ).list()
a=A121957_list(50); a[1:] # G. C. Greubel, Jul 12 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 01 2006
EXTENSIONS
Edited by G. C. Greubel, Jul 12 2021
STATUS
approved