A123127 Coefficient of X^3 in the characteristic polynomial of the n-th power of the matrix M = {{1,1,1,1,1}, {1,0,0,0,0}, {0,1,0,0,0}, {0,0,1,0,0}, {0,0,0,1,0}}.
-1, -3, -4, 1, 49, -42, -57, -31, 140, 497, -815, -758, 311, 3021, 3796, -13759, -7039, 16086, 45295, 3681, -204684, -10431, 365377, 507914, -618001, -2642435, 1427468, 6214881, 3341553, -16185322, -27959273, 42625665, 85186108, -23867663, -286766767, -193092086, 854985639, 900760205
Offset: 1
Examples
a(5) = 49 because the characteristic polynomial of fifth power of pentanacci matrix M^5 is X^5 -31*X^4 +49*X^3 -31*X^2 +9*X -1 in which coefficient of X^3 is 49.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (-1,-2,-3,-3,6,-1,1,0,1,-1).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( -x*(1+4*x+9*x^2 +12*x^3-30*x^4+6*x^5-7*x^6-9*x^8+10*x^9)/(1+x+2*x^2+3*x^3+3*x^4-6*x^5 +x^6 -x^7 -x^9+x^10) )); // G. C. Greubel, Aug 03 2021 -
Maple
with(linalg): M[1]:=matrix(5,5,[1,1,1,1,1,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]): for n from 2 to 40 do M[n]:=multiply(M[n-1],M[1]) od: seq(coeff(charpoly(M[n],x),x,3),n=1..40); # Emeric Deutsch, Oct 24 2006
-
Mathematica
f[n_]:= CoefficientList[CharacteristicPolynomial[MatrixPower[{{1,1,1,1,1}, {1,0,0, 0,0}, {0,1,0,0,0}, {0,0,1,0,0}, {0,0,0,1,0}}, n], x], x][[4]]; Array[f, 36] (* Robert G. Wilson v, Oct 24 2006 *) LinearRecurrence[{-1,-2,-3,-3,6,-1,1,0,1,-1},{-1,-3,-4,1,49,-42,-57,-31,140,497},40] (* Harvey P. Dale, Apr 10 2023 *)
-
PARI
g(y) = y^10 + y^9 + 2*y^8 + 3*y^7 + 3*y^6 - 6*y^5 + y^4 - y^3 - y + 1; my(v=polsym(g(y),33)); vector(#v-1,n,v[n+1]) \\ Joerg Arndt, Nov 02 2020
-
Sage
def A123127_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( -x*(1+4*x+9*x^2+12*x^3-30*x^4+6*x^5-7*x^6-9*x^8+10*x^9)/(1+x+2*x^2 +3*x^3+3*x^4-6*x^5+x^6-x^7-x^9+x^10) ).list() a=A123127_list(40); a[1:] # G. C. Greubel, Aug 03 2021
Formula
G.f.: -x*(1 +4*x +9*x^2 +12*x^3 -30*x^4 +6*x^5 -7*x^6 -9*x^8 +10*x^9)/(1 +x +2*x^2 +3*x^3 +3*x^4 -6*x^5 +x^6 -x^7 -x^9 +x^10). - Colin Barker, May 16 2013
Extensions
Edited by N. J. A. Sloane, Oct 24 2006
More terms from Emeric Deutsch and Robert G. Wilson v, Oct 24 2006
Comments