For other values of n and b, how many sum matrices are there? What do they look like? For other values of n and b, how many sum matrices are there? What do they look like? We say a sum matrix is **primitive** if it does not have any rows or columns of all 0's, and the GCD of all the entries is 1. How many primitive sum matrices are there?

Jeremy Galvagni found some small sum matrices, including the n=4 and n=5 ones in any base.

Joseph DeVincentis proved using algebra that there are 2x2 sum matrices only in bases divisible by 3 with only 1 primitive 2x2 sum matrix, and that there are 3x3 sum matrices only in bases divisible by 7 with only 6 primitive 3x3 matrices. Claudio Baiocchi used a computer to prove the above.

Ludek Frey, Boris Bukh, and Olexandr Ravsky showed that the maximum number of solutions for a fixed n and b is no more than b^{n}.

Berend Jan van der Zwaag was able to count the number of sum matrices for various n and b:

n \ b | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

2 | 1 | 2 | 1 | 1 | 2 | 1 | 1 | 2 | 1 | 1 | 2 | 1 | 1 | 2 |

3 | 1 | 1 | 1 | 1 | 1 | 7 | 1 | 1 | 1 | 1 | 1 | 1 | 7 | 1 |

4 | 5 | 6 | 17 | 15 | 36 | 28 | 62 | 45 | 95 | 66 | 135 | 91 | 182 | 120 |

5 | 3 | 7 | 6 | 6 | 23 | 10 | 15 | 40 | 21 | 231 | 71 | 28 | 36 | 100 |

6 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 322 | 1 | 1 |

7 | 1 | 1 | 1 | 1 | 1 | 4 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |

8 | 1 | 25 | 1 | 1 | 25 | 1 | 1 | 70 | 1 | 1 | ||||

9 | 43 | 4 | 628 | 9 | 325 | |||||||||

10 | 1 | 1 | 1 | 1 | 1 | |||||||||

11 | 21 | |||||||||||||

12 | 1 | |||||||||||||

13 | 1 | |||||||||||||

14 | 5 | |||||||||||||

15 | 1 | |||||||||||||

16 | 43 |

n \ b | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

3 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |

4 | 4 | 5 | 12 | 14 | 26 | 27 | 45 | 39 | 76 | 65 | 87 | 90 | 150 | 99 |

5 | 1 | 3 | 2 | 3 | 11 | 6 | 7 | 27 | 11 | 225 | 40 | 21 | 21 | 78 |

6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 321 | 0 | 0 |

7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||

8 | 0 | 23 | 0 | 0 | 0 | 0 | 0 | 42 | 0 | 0 | ||||

9 | 33 | 0 | 523 | 0 | 246 | |||||||||

10 | 0 | 0 | 0 | 0 | 0 | |||||||||

11 | 10 | |||||||||||||

12 | 0 | |||||||||||||

13 | 0 | |||||||||||||

14 | 0 | |||||||||||||

15 | 0 |

Claudio Baiocchi, Helmut Postl, and Olexandr Ravsky noticed that the set of solutions for a fixed n and b form a vector space. Any potential solution is completely determined by its left column, and those which give solutions are those in which the (n+1)^{st} column vanishes. For each trivial unit vector which form a basis for the first column, find the corresponding (n+1)^{st} column, and try to find some linear combination of these that vanishes.

If we form a matrix A(n) from these vectors, we can find non-trivial solutions when the determinant of A(n) equals zero. This happens when n = 4, 5, 9, 11, 14, 17, 19, 23, 24, 29, 34, 35, 39, 41, 44, 47, 49, 53, 54, 59, 64, 65, 69, 71, 74, 77, 79, 83, 84, 89, 94, 95, 99, . . . . Somewhat surprisingly, the nullspace of these matrices all have dimension 2.

When the determinant is non-zero, it tells us something about which b will have solutions. The determinants are shown in the table below. Those for n ≤ 11 were furnished by Claudio Baiocchi, and I extended the table.

n | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Det A(n) | -3 | -7 | 0 | 0 | 13^{3} | -7 17^{3} | -3^{6} 17^{2} 19 | 0 | 23^{5} 43 | 0 | -3^{6} 5^{6} 53^{3} 79 | -3^{6} 13^{3} 29^{6} 251 | 0 | 7 17^{3} 31^{8} 127^{2} 223 | -2^{16} 67^{5} 101^{2} 103^{2} 409 | 0 |

n | 18 | 19 | 20 | 21 | 12 | 23 | 24 |
---|---|---|---|---|---|---|---|

Det A(n) | -37^{11 }113^{4} 191^{2} 647 | 0 | 3 7^{8} 13^{3} 41^{7} 43^{8} 83^{2} 379 | 23^{5} 43^{9} 89^{6} 131^{2} 263^{2} 1451 | -47^{10} 137^{4} 139^{4} 277^{2} 919^{2} 1747 | 0 | 0 |

Helmut Postl defined a sum matrix to be **basic** if it is a sum matrix in any base. He investigated up to n=100 and found n=4 and n=5 have basic matrices, and that all larger basic matrices seem to be extensions of these. This is confirmed by the fact that the values of n for which the determinant of A(n)=0 are those of the form n=5k-1 or n=6k-1.

1 0 0 1 1 1 0 -1 -1 1 -1 -1 1 0 0 0 0 0 1 -1 -1 1 -1 -1 0 1 1 1 0 0 1 0 0 0 0 0 1 1 0 -1 -1

Helmut Postl also sent me the first rows of all linearly independent n x n sum matrices in base b for n ≤ 20 and b ≤ 100, and which sum matrices exist for n ≤ 100 and b ≤ 100.

Let **s(n,b)** be the number of n x n sum matrices in base b. Then Olexandr Ravsky and Boris Bukh showed that s(n,b) is a multiplicative function of b: if a and b are relatively prime, then s(n, ab) = s(n, a) s(n, b). The proof is a consequence of the unique factorization of elements in Z_{ab} into a product of elements from Z_{a} and Z_{b}.

Olexandr Ravsky went on to find a formula for s(n,b) in terms of the Smith Form of a matrix. Consider the transformations of a matrix of adding to a row (or column) some multiple of another row (or column) or switching two rows (or columns). Using these transformations, we can reduce any matrix to a diagonal matrix where each diagonal element divides the next. This is the Smith Form of the matrix. If we denote the diagonal elements of the Smith Form of A(n) as (d_{1}, d_{2}, ... d_{n}), then s(n,b) is the product of the GCD(d_{i},b).

Boris Bukh showed that if b is prime, then s(n,b) is a power of b and (b-1) b^{k-1} divides s(n,b^{k}) - s(n,b^{k-1})
His proof: Consider all sum matrices modulo b^{k} such that not all elements
are divisible by b. There are s(n,b^{k}) - s(n,b^{k-1}) such sum matrices.
Denote their set as M. Now we consider a family of maps over M, f_{t} : a -> at where GCD(t,b)=1. Obviously f_{t} is a bijection. Call two sum matrices in M equivalent
if there is a mapping f_{t} that maps one onto another. It is easy to check this is an equivalence relation on M. In each equivalence class there are phi(b^{k}) = (b-1) b^{k-1} elements. Therefore, the cardinality of M is divisible by (b-1) b^{k-1}. As a corollary, he shows that in this case, (b-1) divides s(n,b^{k})-1.

Sasha Ravsky proved some things about the binary case. His results can be found here.

If you can extend any of these results, please e-mail me. Click here to go back to Math Magic. Last updated 1/5/03.