Let A be a matrix of order , whose entries are from the set . If the sum of all the entries of A is a prime number , , then the number of such matrices A is :
Answer: 180
Solution
The four entries each range over and their sum must be a prime strictly between and , that is , or . Counting non-negative integer solutions by stars and bars, a sum of gives and a sum of gives , and in both the totals are small enough that no entry can exceed . For a sum of the unrestricted count is , from which the cases with an entry of at least must be removed: fixing one entry to be leaves the remaining three to sum to in ways, and with four choices of which entry that is, this removes (two entries exceeding is impossible when the total is only ), leaving . The total is .
JEE Main · 2022 · 27 Jun 2022 · Shift 2 · Integer answer