Solution:
The maximum and the minimum are, respectively, 30 and 19 and are realized, for example, by the following tables
Indeed, in order for the sum of the
9 digits in a square
3×3 to be divisible by
4, there are only two possibilities: to have
6 times the digit
1 and
3 times the digit
2 (sum
12), or to have
2 times the digit
1 and
7 times the digit
2 (sum
16).
It is therefore evident that in the 4×4 table there are at least 2 digits 1. If we arrange them, in whatever way, inside the central 2×2 square of the table, that is, so as to be contained in all 4 squares 3×3, no further digits 1 are necessary. The maximum sum is therefore realized with 2 digits 1 and 14 digits 2, for a total of 30.
Similarly, in the 4×4 table there are at least 3 digits 2, and no further ones are needed if these are arranged, in whatever way, inside the central 2×2 square of the table. The minimum sum is therefore realized with 3 digits 2 and 13 digits 1, for a total of 19.