login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A146161 a(n) is the number of n X n matrices with entries in {1,2,3} such that all adjacent entries (in the same row or column) differ by 1 or -1. 1

%I #8 Dec 16 2016 04:12:54

%S 3,8,48,512,12288,524288,50331648,8589934592,3298534883328,

%T 2251799813685248,3458764513820540928,9444732965739290427392,

%U 58028439341502200385896448,633825300114114700748351602688

%N a(n) is the number of n X n matrices with entries in {1,2,3} such that all adjacent entries (in the same row or column) differ by 1 or -1.

%C 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.

%C 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.

%F a(n) = 2^((n^2+2)/2) if n is even, and 3*2^((n^2-1)/2) if n is odd.

%e 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.

%K nonn

%O 1,1

%A _W. Edwin Clark_, Oct 27 2008

%E Extended by _Max Alekseyev_, Mar 23 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)