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.
3, 8, 48, 512, 12288, 524288, 50331648, 8589934592, 3298534883328, 2251799813685248, 3458764513820540928, 9444732965739290427392, 58028439341502200385896448, 633825300114114700748351602688
Offset: 1
Keywords
Examples
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.
Formula
a(n) = 2^((n^2+2)/2) if n is even, and 3*2^((n^2-1)/2) if n is odd.
Extensions
Extended by Max Alekseyev, Mar 23 2009
Comments