[go: up one dir, main page]

login
A123952
Sum of first row of the 5 X 5 matrix M^n, where M = {{5,-1,0,0,0}, {-1,5,-1,0,0}, {0,-1,5,-1,0}, {0,0,-1,5,-1}, {0,0,0,-1,5}}.
1
1, 4, 17, 77, 371, 1891, 10123, 56503, 326699, 1945799, 11879987, 74039167, 469266331, 3014973511, 19581735203, 128267231663, 845770626539, 5605309590679, 37293554232307, 248855791875007, 1664285028373691, 11148949376158631, 74779855705724483
OFFSET
0,2
FORMULA
a(n) = 25*a(n-1) - 246*a(n-2) + 1190*a(n-3) - 2828*a(n-4) + 2640*a(n-5) (follows from the minimal polynomial of M).
From Colin Barker, Dec 29 2016: (Start)
a(n) = (2*5^n +(5-sqrt(3))^n*(2+sqrt(3)) -(-2+sqrt(3))*(5+sqrt(3))^n)/6.
a(n) = 15*a(n-1) - 72*a(n-2) + 110*a(n-3) for n>2.
G.f.: (1 - 11*x + 29*x^2) / ((1 - 5*x)*(1 - 10*x + 22*x^2)). (End)
EXAMPLE
a(2) = 17 because the first row of M^2 is [26,-10,1,0,0].
MAPLE
with(linalg): M[1]:=matrix(5, 5, [5, -1, 0, 0, 0, -1, 5, -1, 0, 0, 0, -1, 5, -1, 0, 0, 0, -1, 5, -1, 0, 0, 0, -1, 5]): for n from 2 to 30 do M[n]:=multiply(M[1], M[n-1]) od: 1, seq(add(M[n][1, j], j=1..5), n=1..30);
a[0]:=1: a[1]:=4: a[2]:=17: a[3]:=77: a[4]:=371: for n from 5 to 20 do a[n]:=25*a[n-1]-246*a[n-2]+1190*a[n-3]-2828*a[n-4]+2640*a[n-5] od: seq(a[n], n=0..30);
MATHEMATICA
M = {{5, -1, 0, 0, 0}, {-1, 5, -1, 0, 0}, {0, -1, 5, -1, 0}, {0, 0, -1, 5, -1}, {0, 0, 0, -1, 5}}; v[1] = {1, 1, 1, 1, 1}; v[n_]:= v[n] = M.v[n-1]; Table[v[n][[1]], {n, 1, 30}]
CoefficientList[Series[(1-11*x+29*x^2)/((1-5*x)*(1-10*x+22*x^2)), {x, 0, 30}], x] (* G. C. Greubel, Aug 05 2019 *)
PROG
(PARI) Vec((1-11*x+29*x^2)/((1-5*x)*(1-10*x+22*x^2)) + O(x^30)) \\ Colin Barker, Dec 29 2016
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-11*x+29*x^2)/((1-5*x)*(1-10*x+22*x^2)) )); // G. C. Greubel, Aug 05 2019
(Sage) ((1-11*x+29*x^2)/((1-5*x)*(1-10*x+22*x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Aug 05 2019
(GAP) a:=[1, 4, 17];; for n in [4..30] do a[n]:=15*a[n-1]-72*a[n-2] + 110*a[n-3]; od; a; # G. C. Greubel, Aug 05 2019
CROSSREFS
Sequence in context: A124325 A151248 A104455 * A005494 A257072 A193782
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Nov 24 2006
STATUS
approved