JEE Main · Numerical Answer · Number Theory + Combinatorics
Numerical Answer · Mathematics · Number Theory
Q. Let
$$S = \{(m,n) : m,\, n \in \{1,2,3,\ldots,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 _____ .
✅ Correct Numerical Answer
1333
Part 1 — Finding p ($6^m + 9^n$ divisible by 5)
1
Find $6^m \pmod{5}$
$6 \equiv 1 \pmod{5}$, so:
$6^m \equiv 1^m \equiv 1 \pmod{5}$ for all $m \geq 1$
2
Find $9^n \pmod{5}$ — cyclicity
$9 \equiv 4 \pmod{5}$:
| $n$ | $9^n \pmod 5$ | $n$ parity |
|---|---|---|
| 1 | 4 | Odd |
| 2 | $4^2=16\equiv 1$ | Even |
| 3 | $4^3\equiv 4$ | Odd |
| 4 | $4^4\equiv 1$ | Even |
Period = 2: $9^n \equiv 4$ if $n$ odd, $9^n \equiv 1$ if $n$ even
3
Condition for $5 \mid 6^m + 9^n$
$6^m + 9^n \equiv 1 + 9^n \equiv 0 \pmod{5}$
$\Rightarrow 9^n \equiv 4 \pmod{5}$
$\Rightarrow n$ must be odd
$\Rightarrow 9^n \equiv 4 \pmod{5}$
$\Rightarrow n$ must be odd
4
Count valid pairs
• $m$ can be any of $\{1,\ldots,50\}$: 50 choices
• $n$ must be odd in $\{1,3,5,\ldots,49\}$: 25 choices
• $m$ can be any of $\{1,\ldots,50\}$: 50 choices
• $n$ must be odd in $\{1,3,5,\ldots,49\}$: 25 choices
$p = 50 \times 25 = \mathbf{1250}$
Part 2 — Finding q ($m+n$ = square of a prime)
5
Range of $m + n$
Since $m, n \in \{1,\ldots,50\}$: $m+n \in [2,\, 100]$
6
Find prime squares in $[2, 100]$
Primes $p$ with $p^2 \leq 100$: $p \in \{2, 3, 5, 7\}$
$2^2 = 4, \quad 3^2 = 9, \quad 5^2 = 25, \quad 7^2 = 49$
$(11^2 = 121 > 100$ — excluded$)$
$(11^2 = 121 > 100$ — excluded$)$
7
Count pairs for each target sum
For $m+n = k$ with $m,n \in \{1,\ldots,50\}$: number of pairs $= k-1$ (for $k \leq 51$):
| $m+n$ | Prime | Valid pairs $(m,n)$ | Count |
|---|---|---|---|
| 4 | 2 | (1,3),(2,2),(3,1) | 3 |
| 9 | 3 | (1,8),(2,7),…,(8,1) | 8 |
| 25 | 5 | (1,24),(2,23),…,(24,1) | 24 |
| 49 | 7 | (1,48),(2,47),…,(48,1) | 48 |
$q = 3 + 8 + 24 + 48 = \mathbf{83}$
8
Final Answer: $p + q$
$p + q = 1250 + 83 = $ $\mathbf{1333}$
Related Theory
📌 Modular Arithmetic — Cyclicity of Powers
When finding $a^n \pmod{m}$, the remainders repeat in a cycle (cyclicity). Key results:
• $6^m \equiv 1^m = 1 \pmod 5$ (since $6 = 5+1$)
• $9^n \pmod 5$: cycle length 2 (alternates 4, 1, 4, 1, …)
$a \equiv r \pmod m \Rightarrow a^n \equiv r^n \pmod m$ Cyclicity of $4^n \pmod 5$: period 2
• $6^m \equiv 1^m = 1 \pmod 5$ (since $6 = 5+1$)
• $9^n \pmod 5$: cycle length 2 (alternates 4, 1, 4, 1, …)
$a \equiv r \pmod m \Rightarrow a^n \equiv r^n \pmod m$ Cyclicity of $4^n \pmod 5$: period 2
📌 Counting Ordered Pairs with Fixed Sum
For $m+n = k$ with $m,n \in \{1,\ldots,N\}$:
• If $k \leq N+1$: number of pairs $= k-1$
• If $k > N+1$: number of pairs $= 2N+1-k$
For this problem $N=50$, all target sums (4, 9, 25, 49) are $\leq 51$, so count $= k-1$ in each case.
• If $k \leq N+1$: number of pairs $= k-1$
• If $k > N+1$: number of pairs $= 2N+1-k$
For this problem $N=50$, all target sums (4, 9, 25, 49) are $\leq 51$, so count $= k-1$ in each case.
$m+n=k$, $1\leq m,n\leq 50$: pairs $= \min(k-1,\, 101-k)$
📌 Prime Squares in a Range
Always list primes systematically: 2, 3, 5, 7, 11, 13, …
Check $p^2 \leq$ upper limit. Here upper limit = 100:
$2^2=4 ✓$, $3^2=9 ✓$, $5^2=25 ✓$, $7^2=49 ✓$, $11^2=121 ✗$
Common mistake: forgetting $11^2=121 > 100$ is excluded, or missing that $m+n$ can be at most 100.
Check $p^2 \leq$ upper limit. Here upper limit = 100:
$2^2=4 ✓$, $3^2=9 ✓$, $5^2=25 ✓$, $7^2=49 ✓$, $11^2=121 ✗$
Common mistake: forgetting $11^2=121 > 100$ is excluded, or missing that $m+n$ can be at most 100.
📌 Common Mistakes to Avoid
❌ Mistake 1: Using $9^n \equiv 4$ for all $n$ — it alternates. Even $n$ gives $9^n \equiv 1$, not 4.
❌ Mistake 2: Counting $n=0$ as a valid choice — here $n \in \{1,\ldots,50\}$, so $n=0$ is not allowed.
❌ Mistake 3: Including $11^2=121$ as a valid sum — maximum possible sum is $50+50=100$.
❌ Mistake 4: For $m+n=4$: counting (0,4),(4,0) — these are invalid since $m,n \geq 1$.
❌ Mistake 2: Counting $n=0$ as a valid choice — here $n \in \{1,\ldots,50\}$, so $n=0$ is not allowed.
❌ Mistake 3: Including $11^2=121$ as a valid sum — maximum possible sum is $50+50=100$.
❌ Mistake 4: For $m+n=4$: counting (0,4),(4,0) — these are invalid since $m,n \geq 1$.
📌 Key Formulas
$6^m \equiv 1 \pmod 5$ always
$9^n \pmod 5$: period 2
Odd $n$: $9^n\equiv 4$; Even $n$: $9^n\equiv 1$
Pairs with sum $k$ ($k\leq N+1$): $k-1$
Primes squared $\leq 100$: 4,9,25,49
📌 JEE Relevance
This two-part NAT question tests modular arithmetic and combinatorial counting — both core JEE topics. The key skills are: cyclicity of remainders, and systematic counting of ordered pairs with a given sum. 74% users got it wrong, primarily by errors in the cyclicity pattern of $9^n \pmod 5$ or by missing a prime square. Practice modular cyclicity problems daily for guaranteed marks.
Frequently Asked Questions
1. What is $6^m \pmod 5$?
$6 \equiv 1 \pmod 5$, so $6^m \equiv 1$ for all $m \geq 1$.
2. What is the cyclicity of $9^n \pmod 5$?
Period 2: $9^n \equiv 4$ when $n$ is odd, $9^n \equiv 1$ when $n$ is even.
3. When is $6^m + 9^n \equiv 0 \pmod 5$?
When $9^n \equiv 4 \pmod 5$, i.e., when $n$ is odd.
4. How many odd values does $n$ take in $\{1,\ldots,50\}$?
25 odd values: $1,3,5,\ldots,49$.
5. What is $p$?
$p = 50 \times 25 = 1250$.
6. What prime squares lie in range $[2,100]$?
$4, 9, 25, 49$ (from primes 2, 3, 5, 7).
7. How many pairs give $m+n=25$?
$25-1 = 24$ pairs: $(1,24),(2,23),\ldots,(24,1)$.
8. What is $q$?
$q = 3 + 8 + 24 + 48 = 83$.
9. What is $p + q$?
$p + q = 1250 + 83 = 1333$.
10. Why is $11^2 = 121$ excluded?
Maximum $m+n = 50+50 = 100 < 121$, so no pair can give sum 121.
11. Is 1 considered a prime number here?
No. 1 is not a prime number. The smallest prime is 2.
Related JEE Main Questions
Let $a_1 = 1$ and for $n \geqslant 1$, $a_{n+1} = \dfrac{1}{2}a_n + \dfrac{n^2-2n-1}{n^2(n+1)^2}$. Then $\left|\displaystyle\sum_{n=1}^{\infty}\!\left(a_n – \dfrac{2}{n^2}\right)\right|$ is equal to
Numerical Answer Type
✅ Correct Answer: 2
Let $a_1 = 1$ and for $n \geqslant 1$, $a_{n+1} = \dfrac{1}{2}a_n + \dfrac{n^2-2n-1}{n^2(n+1)^2}$. Then $\left|\displaystyle\sum_{n=1}^{\infty}\!\left(a_n – \dfrac{2}{n^2}\right)\right|$ is equal to
Numerical Answer Type
✅ Correct Answer: 2
Let $f : \mathbf{R} \to \mathbf{R}$ be a twice differentiable function such that the quadratic equation $f(x)\,m^2 – 2f'(x)\,m + f”(x) = 0$ in $m$, has two equal roots for every $x \in \mathbf{R}$. If $f(0) = 1$, $f'(0) = 2$, and $(\alpha,\, \beta)$ is the largest interval in which the function $f(\log_e x – x)$ is increasing, then $\alpha + \beta$ is equal to
Numerical Answer Type
✅ Correct Answer: 1
Let $y = y(x)$ be the solution curve of the differential equation $(1 + x^2)\,dy + \left(y – \tan^{-1}x\right)dx = 0,\; y(0) = 1$. Then the value of $y(1)$ is :
(A) $\dfrac{4}{e^{\pi/4}} – \dfrac{\pi}{2} – 1$
(B) $\dfrac{2}{e^{\pi/4}} + \dfrac{\pi}{4} – 1$
(C) $\dfrac{4}{e^{\pi/4}} + \dfrac{\pi}{2} – 1$
(D) $\dfrac{2}{e^{\pi/4}} – \dfrac{\pi}{4} – 1$
✅ Correct Answer: (B)
Let O be the vertex of the parabola $x^2 = 4y$ and Q be any point on it. Let the locus of the point P, which divides the line segment OQ internally in the ratio $2 : 3$ be the conic C. Then the equation of the chord of $C$, which is bisected at the point $(1, 2)$, is :
(A) $5x-4y+3=0$
(B) $x-2y+3=0$
(C) $4x-5y+6=0$
(D) $5x-y-3=0$
✅ Correct Answer: (A)
If the coefficient of $x$ in the expansion of $(ax^2 + bx + c)(1 – 2x)^{26}$ is $-56$ and the coefficients of $x^2$ and $x^3$ are both zero, then $a + b + c$ is equal to :
(A) 1483
(B) 1300
(C) 1500
(D) 1403
✅ Correct Answer: (D) 1403