OFFSET
0,7
COMMENTS
Let v(n) = [T(n,0), T(n,1), T(n,2), T(n,3), T(n,4)]' for n >= 0, where ' denotes transpose, and M = [[1,2,0,0,2], [2,1,2,0,0], [0,2,1,2,0], [0,0,2,1,2], [2,0,0,2,1]]. We claim that v(n+1) = M*v(n) for n >= 0.
To see why this is the case, let j in 0..4, and consider the expressions 0^2 + j, 1^2 + j, 2^2 + j, 3^2 + j, and 4^2 + j modulo 5. It can be easily proved that these five numbers contain M[0,j] 0's, M[1,j] 1's, M[2,j] 2's, M[3,j] 3's, and M[4,j] 4's. (This is how the transfer matrix M was constructed. The idea is similar to Jianing Song's ideas for sequences A101990, A318609, and A318610.)
It follows that v(n) = M^n * v(0), where v(0) = [1,0,0,0,0]'.
The minimal polynomial for M is (z - 5)*(z^2 - 5) = z^3 - 5*z^2 - 5*z + 25. Thus, M^3 - 5*M^2 - 5*M + 25*I = 0, and so M^n*v(0) - 5*M^(n-1)*v(0) - 5*M^(n-2)*v(0) + 25*M^(n-3)*v(0) = 0 for n >= 3. This implies v(n) - 5*v(n-1) - 5*v(n-2) + 25*v(n-3) = 0 for n >= 3. Hence each sequence (T(n,k): n >= 0) satisfies the same recurrence b(n) - 5*b(n-1) - 5*b(n-2) + 25*b(n-3) = 0 for n >= 3.
Clearly, for each k in 0..4, we may find constants c_k, d_k, e_k such that T(n,k) = c_k*sqrt(5)^n + d_k*(-sqrt(5))^n + e_k*5^n for n >= 0. We omit the details.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,5,0,0,0,0,5,0,0,0,0,-25).
FORMULA
T(n,k) = 5*T(n-1,k) + 5*T(n-2,k) - 25*T(n-3,k) for n >= 3 with initial conditions for T(0,k), T(1,k), and T(2,k) (for each value of k in 0..4) given in the example below.
T(n,k) = 5*T(n-2,k) + 4*5^(n-2) for n >= 2.
T(n,k=1) = T(n,k=4) and T(n,k=2) = T(n,k=3).
T(n,k) ~ 5^(n-1) for each k in 0..4.
Sum_{k = 0..4} T(n,k) = 5^n.
v(n+1) = M*v(n) and v(n) = M^n * [1,0,0,0,0]' for n >= 0, where M = [[1,2,0,0,2], [2,1,2,0,0], [0,2,1,2,0], [0,0,2,1,2], [2,0,0,2,1]] and v(n) = [T(n,0), T(n,1), T(n,2), T(n,3), T(n,4)]'.
From Colin Barker, Dec 21 2019: (Start)
If we consider the array as a single sequence (a(n): n >= 1), then:
G.f.: (1 - 4*x^5 + 2*x^6 + 2*x^9 - x^10 - 6*x^11 + 4*x^12 + 4*x^13 - 6*x^14) / ((1 - 5*x^5)*(1 - 5*x^10)).
a(n) = 5*a(n-5) + 5*a(n-10) - 25*a(n-15) for n > 14. (End)
EXAMPLE
Array T(n,k) (with rows n >= 0 and columns 0 <= k <= 4) begins as follows:
1, 0, 0, 0, 0;
1, 2, 0, 0, 2;
9, 4, 4, 4, 4;
25, 30, 20, 20, 30;
145, 120, 120, 120, 120;
625, 650, 600, 600, 650;
3225, 3100, 3100, 3100, 3100;
...
T(n=2,k=0) = 9 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 0 (mod 5) (with x_1, x_2 in 0..4): (0,0), (1,2), (1,3), (2,1), (2,4), (3,1), (3,4), (4,2), and (4,3).
T(n=2,k=1) = 4 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 1 (mod 5) (with x_1, x_2 in 0..4): (0,1), (0,4), (1,0), and (4,0).
T(n=2,k=2) = 4 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 2 (mod 5) (with x_1, x_2 in 0..4): (1,1), (1,4), (4,1), and (4,4).
T(n=2,k=3) = 4 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 3 (mod 5) (with x_1, x_2 in 0..4): (2,2), (2,3), (3,2), and (3,3).
T(n=2,k=4) = 4 because we have the following solutions (x_1, x_2) to the equation x_1^2 + x_2^2 == 4 (mod 5) (with x_1, x_2 in 0..4): (0,2), (0,3), (2,0), and (3,0).
MAPLE
with(LinearAlgebra);
v := proc(n) local M, v0;
M := Matrix([[1, 2, 0, 0, 2], [2, 1, 2, 0, 0], [0, 2, 1, 2, 0], [0, 0, 2, 1, 2], [2, 0, 0, 2, 1]]); v0 := Matrix([[1], [0], [0], [0], [0]]);
if n = 0 then v0; else MatrixMatrixMultiply(MatrixPower(M, n), v0); end if;
end proc;
seq(seq(v(n)[k, 1], k = 1 .. 5), n = 0 .. 10);
PROG
(PARI) Vec((1 - 4*x^5 + 2*x^6 + 2*x^9 - x^10 - 6*x^11 + 4*x^12 + 4*x^13 - 6*x^14) / ((1 - 5*x^5)*(1 - 5*x^10)) + O(x^50)) \\ Colin Barker, Dec 21 2019
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
Petros Hadjicostas, Dec 20 2019
STATUS
approved