Sign in
Please select an account to continue using cracku.in
↓ →
Join Our JEE Preparation Group
Prep with like-minded aspirants; Get access to free daily tests and study material.
How many natural numbers $$n\leq 105$$ are there such that $$ 7\mid 2^{n}-n^{2} $$?
Correct Answer: 30
We want all natural numbers $$n \le 105$$ that satisfy the congruence
$$2^{\,n} \equiv n^{2} \pmod{7}\,.$$
Step 1 : Period of $$2^{\,n} \pmod{7}$$
Since $$2^{3}=8 \equiv 1 \pmod{7}$$, the powers of $$2$$ repeat every $$3$$.
Therefore
$$2^{\,n} \equiv \begin{cases} 1 & \text{if } n \equiv 0 \pmod{3},\\ 2 & \text{if } n \equiv 1 \pmod{3},\\ 4 & \text{if } n \equiv 2 \pmod{3}. \end{cases}$$
Step 2 : Possible values of $$n^{2} \pmod{7}$$
Because there are only seven residues, list the squares:
$$\begin{array}{c|ccccccc} n \pmod{7} & 0 & 1 & 2 & 3 & 4 & 5 & 6\\ \hline n^{2} \pmod{7} & 0 & 1 & 4 & 2 & 2 & 4 & 1 \end{array}$$
Step 3 : Combine the two moduli
The pattern of $$2^{\,n}$$ repeats every $$3$$, and that of $$n^{2}$$ repeats every $$7$$.
Hence the combined congruence repeats every $$\operatorname{lcm}(3,7)=21$$.
It suffices to test $$n=1,2,\dots ,21$$ and then extend the count up to $$105=5\times 21$$.
Step 4 : Check each residue $$n \pmod{21}$$
Compare $$2^{\,n}\pmod{7}$$ with $$n^{2}\pmod{7}$$:
$$\begin{array}{c|cccccccccccccccccccccc} n & 1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20&21\\ \hline 2^{\,n}\!\!\pmod{7} & 2&4&1&2&4&1&2&4&1&2&4&1&2&4&1&2&4&1&2&4&1\\ n^{2}\!\!\pmod{7} & 1&4&2&2&4&1&0&1&4&2&2&4&1&0&1&4&2&2&4&1&0 \end{array}$$
The congruence holds precisely for
$$n=2,\,4,\,5,\,6,\,10,\,15.$$
Thus there are $$6$$ solutions in one block of length $$21$$.
Step 5 : Extend to $$n \le 105$$
The interval $$1 \le n \le 105$$ contains exactly $$5$$ full blocks of length $$21$$:
$$105 = 5 \times 21.$$
Therefore the total number of acceptable $$n$$ is
$$6 \times 5 = 30.$$
Answer: 30
Click on the Email ☝️ to Watch the Video Solution
Predict your JEE Main percentile, rank & performance in seconds
Educational materials for JEE preparation