OFFSET
1,1
COMMENTS
Let G(n) be the graph whose vertices are sequences of length n with entries in {1,2,3} for which adjacent terms differ by +-1 and {s,t} is an edge if the i-th term of sequence s differs from the i-th term of sequence t by +-1. Let A be the adjacency matrix of this graph. Then a(n) is the sum of the entries in A^(n-1). That is, a(n) is the number of paths of length n-1 in the graph G(n). Conjecture: a(n) = 2^A097063(n) for n even and 2*2^A097063(n) if n is odd.
Proof that a(n) = 2^A097063(n) for n even and 2*2^A097063(n) if n is odd, by Max Alekseyev: Suppose that elements of the n X n matrix are colored in black and white like a chessboard. Then either all black or all white elements must equal 2. Each element of the other color can be 1 or 3 independently. For even n, the number of black and white elements is the same and equal n/2. For odd n, the number of black/white squares differs by 1. Therefore the number of n X n matrices defined in A146161 is 2*2^(n^2/2)=2^((n^2+2)/2) if n is even, and 2^((n^2+1)/2) + 2^((n^2-1)/2) = 3*2^((n^2-1)/2) if n is odd. The explicit formula for A097063 gives A097063(n) = (n^2+2)/2 for even n, and A097063(n) = (n^2-1)/2 for odd n. So the conjecture is true.
FORMULA
a(n) = 2^((n^2+2)/2) if n is even, and 3*2^((n^2-1)/2) if n is odd.
EXAMPLE
The a(2)=8 2 X 2 matrices with the desired property are {[[1, 2], [2, 1]], [[1, 2], [2, 3]], [[2, 1], [1, 2]], [[2, 1], [3, 2]], [[2, 3], [1, 2]], [[2, 3], [3, 2]], [[3, 2], [2, 1]], [[3, 2], [2, 3]]}. Here a matrix is represented as a list of its rows.
CROSSREFS
KEYWORD
nonn
AUTHOR
W. Edwin Clark, Oct 27 2008
EXTENSIONS
Extended by Max Alekseyev, Mar 23 2009
STATUS
approved
