OFFSET
1,1
COMMENTS
Essentially the same as A028872 (n^2-3 with offset 2).
a(n) is the constant term of the quadratic factor of the characteristic polynomial of the 5 X 5 tridiagonal matrix M_n with M_n(i,j) = n for i = j, M_n(i,j) = -1 for i = j+1 and i = j-1, M_n(i,j) = 0 otherwise.
The characteristic polynomial of M_n is (x-(n-1))*(x-n)*(x-(n+1))*(x^2-2*n*x+c) with c = n^2-3.
The characteristic polynomials are related to chromatic polynomials, cf. links. They have roots n+sqrt(3).
LINKS
Eric W. Weisstein, Chromatic Polynomial
Wikipedia, Chromatic polynomial
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 2*n + a(n-1) - 1. - Vincenzo Librandi, Nov 12 2010
G.f.: x*(-2+x)*(1-3*x)/(1-x)^3. - Colin Barker, Jan 29 2012
EXAMPLE
The quadratic factors of the characteristic polynomials of M_n for n = 1..6 are
x^2 - 2*x - 2,
x^2 - 4*x + 1,
x^2 - 6*x + 6,
x^2 - 8*x + 13,
x^2 - 10*x + 22,
x^2 - 12*x + 33.
MAPLE
with(combinat):seq(fibonacci(3, i)-4, i=1..55); # Zerinvary Lajos, Mar 20 2008
MATHEMATICA
M[n_] := {{n, -1, 0, 0, 0}, {-1, n, -1, 0, 0}, {0, -1, n, -1, 0}, {0, 0, -1, n, -1}, {0, 0, 0, -1, n}}; p[n_, x_] = Factor[CharacteristicPolynomial[M[n], x]] Table[ -3 + n^2, {n, 1, 25}]
PROG
(Magma) mat:=func< n | Matrix(IntegerRing(), 5, 5, [< i, j, i eq j select n else (i eq j+1 or i eq j-1) select -1 else 0 > : i, j in [1..5] ]) >; [ Coefficients(Factorization(CharacteristicPolynomial(mat(n)))[4][1])[1]:n in [1..50] ]; // Klaus Brockhaus, Nov 13 2010
(PARI) A123968(n) = n^2-3 /* or: */
(PARI) a(n)=polcoeff(factor(charpoly(matrix(5, 5, i, j, if(abs(i-j)>1, 0, if(i==j, n, -1)))))[4, 1], 0)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Gary W. Adamson and Roger L. Bagula, Oct 29 2006
EXTENSIONS
Edited and extended by Klaus Brockhaus, Nov 13 2010
Definition simplified by M. F. Hasler, Nov 12 2010
STATUS
approved