Number Theory – Divisibility & Counting – JEE Main 21 Jan 2026 Shift 1

Question ID: #667
JEE Main21 January Shift 1, 2026Algebra

Let $S=\{(m,n): m, n\in\{1,2,3,…..,50\}\}$ . If the number of elements (m, n) in S such that $6^{m}+9^{n}$ is a multiple of 5 is p and the number of elements (m, n) in S such that $m+n$ is a square of a prime number is q, then $p+q$ is equal to……..


Solution:


Part 1: Finding p (Divisibility by 5)
We need $6^m + 9^n$ to be a multiple of 5.
Let’s look at the unit digits (last digits) of powers of 6 and 9:
1. **Powers of 6:** $6^1=6, 6^2=36, \dots$
$6^m$ always ends in 6 for any $m$.
2. **Powers of 9:**
$9^1 = 9$ (ends in 9)
$9^2 = 81$ (ends in 1)
$9^3 = 729$ (ends in 9)
If $n$ is odd, $9^n$ ends in 9.
If $n$ is even, $9^n$ ends in 1.

Now, check the sum $6^m + 9^n$:
* If $n$ is even: Sum ends in $6 + 1 = 7$. (Not divisible by 5).
* If $n$ is odd: Sum ends in $6 + 9 = 15$ (ends in 5). (Divisible by 5) .

So, the condition is satisfied only when n is odd.
* **Choices for m:** $m$ can be any number from 1 to 50 (50 ways).
* **Choices for n:** $n$ must be an odd number from 1 to 50. There are 25 odd numbers (25 ways).
$$p = 50 \times 25 = 1250$$

Part 2: Finding q (Sum is square of a prime)
We need $m + n = (\text{prime})^2$.
The maximum sum is $50 + 50 = 100$.
Squares of prime numbers up to 100 are: $2^2=4$, $3^2=9$, $5^2=25$, $7^2=49$.
We count the number of pairs $(m, n)$ for each sum:
1. **Sum = 4:** Pairs are $(1,3), (2,2), (3,1)$. Total = 3 ways.
2. **Sum = 9:** Pairs are $(1,8), (2,7), \dots, (8,1)$. Total = 8 ways.
3. **Sum = 25:** Pairs are $(1,24), \dots, (24,1)$. Total = 24 ways.
4. **Sum = 49:** Pairs are $(1,48), \dots, (48,1)$. Total = 48 ways.

Total ways for q:
$$q = 3 + 8 + 24 + 48 = 83$$

Final Answer:
$$p + q = 1250 + 83 = 1333$$

Ans. 1333

Was this solution helpful?
YesNo