Let A be a matrix of order 2×2, whose entries are from the set {0,1,2,3,4,5}. If the sum of all the entries of A is a prime number p, 2<p<8, then the number of such matrices A is\_\_\_\_
Answer: 180
Solutions · 1
Official solution
Possible primes: p=3,5,7.
p=3: entry patterns (0,0,0,3),(0,0,1,2),(0,1,1,1) give 4+12+4=20 arrangements.
p=5: patterns (0,0,0,5),(0,0,1,4),(0,0,2,3),(0,1,1,3),(0,1,2,2),(1,1,1,2) give 4+12+12+12+12+4=56.
p=7: patterns (per the source) sum to 104 arrangements.
Total =20+56+104=180.