Let , , . The number of matrices such that the sum of all entries is a prime number is ______.
Solution
Core idea. A count of bounded whole-number solutions is found by removing the solutions that break the bound.
Concept refresher. The number of ways to write as an ordered sum of whole numbers, each at least zero, is
Picture the situation. The four entries are whole numbers from 0 to 4, so their sum is at most 16. The primes strictly between 2 and 13 are 3, 5, 7 and 11. For each, the number of matrices is the number of ways to write that prime as an ordered sum of four whole numbers, none of them more than 4.
Approach. For each of the four primes count the ordered sums, correcting for the upper limit.
Step 1: The sums 3 and 5
For the sum 3 no entry can exceed 4, so the count is . For the sum 5 there are solutions, of which 4 have an entry equal to 5, leaving 52.
Step 2: The sum 7
There are solutions. If one chosen entry is at least 5, taking 5 from it leaves a sum of 2, with solutions; the 4 choices of entry give 40. So the count is .
Step 3: The sum 11
There are solutions. One chosen entry at least 5 leaves a sum of 6, with solutions, so 336 are removed. Two chosen entries at least 5 leave a sum of 1, with 4 solutions, for each of the 6 pairs, so 24 are added back. The count is .
Step 4: The total
Adding the counts for the four prime sums gives matrices.
Answer. 204
Sanity check. The counts for the sums 5 and 11 are equal, as they must be: replacing each entry by turns a sum of 5 into a sum of 11.
Common wrong answers
- 560: Ignoring the upper limit 4 on each entry gives .
- 224: Including the prime 13, although the interval is open, adds 20 more matrices and gives 224.
Key takeaway
The trap. For a large sum two entries can exceed the limit together, and those cases are added back.
How toppers think. They use the symmetry between a sum and its complement to check the counts.
Remember.
More on Types of Matrices
- The number of 3 × 2 matrices A, which can be formed using the elements of the set {-2, -1, 0, 1, 2} such…
- The number of singular matrices of order 2, whose elements are from the set {2, 3, 6, 9} is
- Let A be a 3 × 3 matrix of non-negative real elements such that A 1; 1; 1 = 3 1; 1; 1. Then the maximum…
- All 11 on Types of Matrices ›