login
A395826
Number of 4n X 4n matrices of decimal digits with the following property: the matrix decomposes into a 3 X 3 block structure with corners of size n X n and a center of size 2n X 2n, and for every row and every column, the n-digit number formed by the leftmost (resp. topmost) n digits times the n-digit number formed by the rightmost (resp. bottommost) n digits equals the 2n-digit number formed by the middle 2n digits; digits in the outer n rows and outer n columns must be nonzero.
0
OFFSET
0,2
COMMENTS
The order-1 case of this sequence enumerates the 4 X 4 digit squares introduced in the FiveThirtyEight "Riddler Express" puzzle of June 9, 2017 (see Links): a 4 X 4 array of digits in which every row and every column reads as the equation a*d = (10b + c), where a, b, c, d are the four digits of that row or column read in order. The matrices counted by this sequence are the natural generalization to order n, in which the outer factors are n-digit numbers and the middle product is a 2n-digit number, embedded in a 4n X 4n grid.
Formally, an order-n square is a 4n X 4n matrix of decimal digits {0,...,9} that decomposes into a 3 X 3 block structure with corners of size n X n and a center of size 2n X 2n. For each of the 4n rows, the n-digit integer formed by the leftmost n digits multiplied by the n-digit integer formed by the rightmost n digits equals the 2n-digit integer formed by the middle 2n digits; the same multiplicative identity holds for each of the 4n columns, read top-to-bottom. Digits in the outer n rows and outer n columns must be nonzero, so that the n-digit factors do not have leading zeros.
LINKS
Tyler Barron, Barron Squares, blog post with examples and summary of results, 2026.
Tyler Barron, find_4x4.py, exhaustive Python enumeration verifying a(1) = 118.
Tyler Barron, barron8x8.c, parallel C enumeration computing a(2) = 1248.
Tyler Barron, verify_8x8.c, independent C implementation re-verifying a(2) = 1248.
Oliver Roeder, Can You Crack This Square's Hidden Code?, FiveThirtyEight, The Riddler, June 9, 2017.
EXAMPLE
For n = 1, one of the 118 squares is
6 | 4 2 | 7
--+-----+--
4 | 2 0 | 5
8 | 4 8 | 6
--+-----+--
8 | 6 4 | 8
Rows: 6*7 = 42, 4*5 = 20, 8*6 = 48, 8*8 = 64. Columns: 6*8 = 48, 4*6 = 24, 2*4 = 08, 7*8 = 56.
For n = 2, one of the 1248 squares is
1 4 | 1 3 8 6 | 9 9
8 4 | 8 1 4 8 | 9 7
----+---------+----
1 3 | 0 2 3 4 | 1 8
7 4 | 2 2 9 4 | 3 1
4 7 | 3 9 4 8 | 8 4
6 6 | 4 4 8 8 | 6 8
----+---------+----
9 7 | 1 7 4 6 | 1 8
7 9 | 3 4 7 6 | 4 4
First two rows: 14*99 = 1386, 84*97 = 8148. First two columns: 18*97 = 1746, 44*79 = 3476.
CROSSREFS
Sequence in context: A250793 A334646 A232776 * A175876 A220715 A230917
KEYWORD
nonn,base,bref,hard,more
AUTHOR
Tyler Barron, May 07 2026
STATUS
approved