Let , where , . The number of matrices such that the sum of all entries is a prime number is:
JEE Mathematics 2023 Question with Solution
Answer
Correct answer:204
Step-by-step solution
Generating Function Method
Given: is a matrix with each entry chosen from .
Find: The number of matrices for which the sum of all four entries is a prime number in the required range.
Let the four entries be . Then we need the number of solutions of
with , where the relevant prime sums used in the solution are .
Use the generating function
and extract coefficients of .
For ,
The coefficient of is
So the number of matrices with sum is .
For , the solution gives
So the number of matrices with sum is .
For , the solution totals this case as .
For , using the correction terms from the generating function expansion,
So the number of matrices with sum is .
Therefore, total matrices
Hence, the required number of matrices is .
Casewise Coefficient Counting
Given: Each entry of the matrix belongs to .
Find: The number of matrices whose total sum is one of the prime values counted in the solution.
Each matrix corresponds to an ordered quadruple with
The generating function for one entry is
Hence for four entries it is
The coefficient of gives the number of matrices with total sum .
- For sum , upper bounds do not interfere, so the count is the number of non-negative solutions of
which is
- For sum , first count all non-negative solutions:
Now subtract the four cases where one variable is at least . That leaves
-
For sum , the solution reports this case contributes .
-
For sum , inclusion-exclusion gives
that is,
Adding all reported valid cases,
Therefore, the answer is .
Common mistakes
Counting only unordered collections of entries instead of ordered quadruples. A matrix position matters, so and are different matrices. Count ordered choices through coefficients or stars-and-bars with corrections.
Ignoring the upper bound . Plain stars-and-bars works directly only when no variable exceeds . For sums like or , inclusion-exclusion or generating functions must be used.
Using the prime set incorrectly. The solution counts the admissible prime sums casewise and then adds their individual counts. Do not stop after checking only one prime value; include every valid sum considered in the solution.
Practice more Applications of P&C questions
Get unlimited AI-adaptive practice, mastery tracking, and an AI tutor that explains every step — free to start.
Related questions
- The number of strictly increasing functions f from the set 1, 2, 3, 4, 5, 6 to the set 1, 2, 3,, 9 such that…Medium · JEE 2026
- Let S = (m, n): m, n 1, 2, 3,....., 50. If the number of elements (m, n) in S such that 6^m+9^n is a multiple…Medium · JEE 2026
- The largest n N, for which 7^n divides 101!, is:Easy · JEE 2026
- If ( 1^15C0 + 1^15C1) ( 1^15C1 + 1^15C2) ( 1^15C12 + 1^15C13) = ^13^14C0 ^14C1 ^14C12, then 30 is equal to.Medium · JEE 2026
- Let ABC be a triangle. Consider four points p1, p2, p3, p4 on the side AB, five points p5, p6, p7, p8, p9 on…Medium · JEE 2026
- The number of 4-letter words, with or without meaning, which can be formed using the letters PQRPRSTUVP, is:Medium · JEE 2026
