login
A145789
Number of n X n binary arrays with all ones connected only either four adjacent vertically or four adjacent horizontally.
0
1, 1, 1, 1, 15, 89, 904, 10469, 202299, 6253788, 295345323, 20297903190, 2062672356086, 313264131593508, 71761762035300434, 24717630557949691794, 12717303956216247045468
OFFSET
0,5
COMMENTS
Otherwise said, all nonzero elements must be member of an 1 X 4 or of a 4 X 1 subarray, and these subarrays must not touch each other (along a "side", but they can touch "diagonally" as we see in n = 5, cf. Examples). - M. F. Hasler, Jul 05 2025
The original calculation was performed using BDDs. The original terms a(1)-a(13) were verified and new terms a(14)-a(16) were added as follows: This may be analyzed by realizing the problem as counting independent sets in a certain undirected graph, whose vertices are the top squares of a vertical segment, and the left hand squares of a horizontal segment, with edges connecting those that intersect or border on one another. This is then converted to a SAT problem and given to the model counter ganak. - Victor S. Miller, Jan 17 2026
EXAMPLE
From M. F. Hasler, Jul 05 2025: (Start)
For n < 4, we can only have the zero matrix, hence a(n) = 1.
For n = 4, we have the zero matrix, or one row of '1's (=> 4 possibilities) or two rows of '1's separated by at least one zero row (=> 3 possibilities), or the same vertically, for a total of a(4) = 1 + 7 + 7 = 15 possibilities.
For n = 5, it is similar, but now each of the nonzero row- or column-submatrices of length 4 can touch the border at either side, and we can have up to 3 rows. Finally we can also have, for each of the 4 corners, the corresponding border row and column filled with 1's except for the corner itself. That yields a total of 1 + 2 * (5*2 + (3+2+1)*2^2 + 1*2^3) + 4 = 89. (End)
Maximal 6 X 6 example:
1.1.1.1.0.0
0.0.0.0.0.1
1.1.1.1.0.1
0.0.0.0.0.1
0.0.0.0.0.1
0.1.1.1.1.0
KEYWORD
nonn,more
AUTHOR
R. H. Hardin, Oct 19 2008
EXTENSIONS
a(14)-a(16) from Victor S. Miller, Jan 16 2026
STATUS
approved