This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A123968 #59 Feb 16 2025 08:33:03 %S A123968 -2,1,6,13,22,33,46,61,78,97,118,141,166,193,222,253,286,321,358,397, %T A123968 438,481,526,573,622,673,726,781,838,897,958,1021,1086,1153,1222,1293, %U A123968 1366,1441,1518,1597,1678,1761,1846,1933,2022,2113,2206,2301,2398,2497 %N A123968 a(n) = n^2 - 3, starting at n=1. %C A123968 Essentially the same as A028872 (n^2-3 with offset 2). %C A123968 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. %C A123968 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. %C A123968 The characteristic polynomials are related to chromatic polynomials, cf. links. They have roots n+sqrt(3). %H A123968 Eric W. Weisstein, <a href="https://mathworld.wolfram.com/ChromaticPolynomial.html">Chromatic Polynomial</a>. %H A123968 Wikipedia, <a href="http://en.wikipedia.org/wiki/Chromatic_polynomial">Chromatic polynomial</a>. %H A123968 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1). %F A123968 a(n) = 2*n + a(n-1) - 1. - _Vincenzo Librandi_, Nov 12 2010 %F A123968 G.f.: x*(-2+x)*(1-3*x)/(1-x)^3. - _Colin Barker_, Jan 29 2012 %F A123968 From _Elmo R. Oliveira_, Jan 16 2025: (Start) %F A123968 E.g.f.: exp(x)*(x^2 + x - 3) + 3. %F A123968 a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3. (End) %e A123968 The quadratic factors of the characteristic polynomials of M_n for n = 1..6 are %e A123968 x^2 - 2*x - 2, %e A123968 x^2 - 4*x + 1, %e A123968 x^2 - 6*x + 6, %e A123968 x^2 - 8*x + 13, %e A123968 x^2 - 10*x + 22, %e A123968 x^2 - 12*x + 33. %p A123968 with(combinat):seq(fibonacci(3, i)-4,i=1..55); # _Zerinvary Lajos_, Mar 20 2008 %t A123968 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}] %o A123968 (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 %o A123968 (PARI) A123968(n) = n^2-3 /* or: */ %o A123968 (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) %Y A123968 Essentially the same: A028872, A267874. %K A123968 sign,easy %O A123968 1,1 %A A123968 _Gary W. Adamson_ and _Roger L. Bagula_, Oct 29 2006 %E A123968 Edited and extended by _Klaus Brockhaus_, Nov 13 2010 %E A123968 Definition simplified by _M. F. Hasler_, Nov 12 2010