OFFSET
0,3
COMMENTS
Consider the matrix M = [1,1,1;1,N,1;1,1,1];
Characteristic polynomial of M is x^3 + (-N - 2)*x^2 + (2*N - 2)*x.
Now (M^n)[1,2] is equivalent to the recursion a(1) = 1, a(2) = N+2, a(n) = (N+2)a(n-1)+(2N-2)a(n-2). (This also holds for negative N and fractional N.)
a(n+1)/a(n) converges to the upper root of the characteristic polynomial ((N + 2) + sqrt((N - 2)^2 + 8))/2 for n to infinity.
Columns of array follow the polynomials:
0
1
N + 2
N^2 + 2*N + 6
N^3 + 2*N^2 + 8*N + 16
N^4 + 2*N^3 + 10*N^2 + 24*N + 44
N^5 + 2*N^4 + 12*N^3 + 32*N^2 + 76*N + 120
N^6 + 2*N^5 + 14*N^4 + 40*N^3 + 112*N^2 + 232*N + 328
N^7 + 2*N^6 + 16*N^5 + 48*N^4 + 152*N^3 + 368*N^2 + 704*N + 896
N^8 + 2*N^7 + 18*N^6 + 56*N^5 + 196*N^4 + 528*N^3 + 1200*N^2 + 2112*N + 2448
etc.
FORMULA
T(N, 1)=1, T(N, 2)=N+2, T(N, n)=(N+2)*T(N, n-1)-(2*N-2)*T(N, n-2).
EXAMPLE
Array begins:
1,2,6,16,44,120,328,896,2448,6688,...
1,3,9,27,81,243,729,2187,6561,19683, ...
1,4,14,48,164,560,1912,6528,22288,76096,...
1,5,21,85,341,1365,5461,21845,87381,349525,...
1,6,30,144,684,3240,15336,72576,343440,1625184,...
1,7,41,231,1289,7175,39913,221991,1234633,6866503,...
...
PROG
(PARI) T12(N, n) = if(n==1, 1, if(n==2, N+2, (N+2)*T12(N, n-1)-(2*N-2)*T12(N, n-2)))
for(k=0, 10, print1(k, ": "); for(i=1, 10, print1(T12(k, i), ", ")); print())
CROSSREFS
KEYWORD
AUTHOR
Lambert Klasen (lambert.klasen(AT)gmx.net), Jan 27 2005
STATUS
approved