For each positive integer k with n^{2} decimal digits (and leading digit non-zero), let d(k) be the determinant of the matrix formed by writing the digits in order across the rows (so if k has decimal form a_{1}a_{2} ... a_{n}, then the matrix has elements b_{ij} = a_{n(i-1)+j}). Find f(n) = ∑d(k), where the sum is taken over all 9·10^{n2-1} such integers.

**Solution**

Answer: f(1) = 45; f(2) = 10.45^{2}; for n ≥ 3, f(n) = 0.

*Straightforward.*

f(1) = 1 + 2 + ... + 9 = 45.

f(2) = ∑ (a_{11}a_{22} - a_{12}a_{21}). Summing a_{11}a_{22} over a term that is present, such as a_{22} gives a factor 45. Summing over a term that is not present gives a factor 10, unless the sum is over a_{11} in which case it gives a factor 9. Hence the sum for a_{11}a_{22} is 45^{2}10^{2}. Similarly, the sum for - a_{12}a_{21} is - 45^{2}90. Hence the total is 10.45^{2}.

The same approach gives zero for n ≥ 3, because there are an even number of terms involving a_{11}, half with a plus sign and half with a minus sign. Thus the sum over these terms is zero. Similarly, there are an even number of terms not involving a_{11}, half with a plus sign and half with a minus sign. Again, the sum over these terms is zero.

© John Scholes

jscholes@kalva.demon.co.uk

12 Dec 1998