Problem:
In how many ways can the cells of a table be filled in with the digits so that each of the 4-digit numbers formed by the columns is divisible by each of the 4-digit numbers formed by the rows?
Solution
Solution:
If and are 4-digit numbers with the same first digit, and divides , then since , must equal . In particular, since the number formed by the first row of the table divides the number in the first column (and both have the same first digit), these numbers must be equal; call their common value . Then, for , or , we find that the number in the th column and the number in the th row have the same first digit (namely the th digit of ), so by the same reasoning, they are equal. Also, the smallest number formed by any column is divisible by the largest number formed by any row, but by the symmetry just proven, is also the largest number formed by any column, so . Since is divisible by , we must have equality. Then all columns contain the same number - and hence all rows also contain the same number - which is only possible if all 16 cells contain the same digit. Conversely, for each , filling in all 16 cells with the digit clearly gives a table meeting the required condition, so we have exactly 9 such tables, one for each digit.