Let be a matrix of order , whose entries are from the set . If the sum of all the entries of is a prime number , , then the number of such matrices 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 5. The primes strictly between 2 and 8 are 3, 5 and 7. For each, the number of matrices is the number of ways to write that prime as an ordered sum of four whole numbers, none more than 5.
Approach. For each of the three primes count the ordered sums, correcting for the upper limit.
Step 1: The sums 3 and 5
For these sums no entry can exceed 5, so the counts are and .
Step 2: The sum 7
There are solutions. If one chosen entry is at least 6, taking 6 from it leaves a sum of 1, with 4 solutions; the 4 choices of entry give 16. So the count is .
Step 3: The total
Adding the counts for the three prime sums gives matrices.
Answer. 180
Sanity check. The 16 excluded matrices for the sum 7 are those with an entry 7, of which there are 4, and those with an entry 6 and an entry 1, of which there are 12.
Common wrong answers
- 196: Not removing the solutions with an entry of 6 or 7 for the sum 7 gives .
Key takeaway
The trap. The upper limit matters only for sums larger than the limit itself.
How toppers think. They check which sums can break the bound before applying any correction.
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 ›