Problem:
MyApproach:
After finding the probability for X=4,5,6 using bernoulli trials,the question states that they are in ap and so find the value of n.I can't understand the relation between ap and finding the value of n.
NOTE:
multiple answers are correct


For $0\leq k \leq n$ we have
$$\mathbb P(X=k)=\binom{n}k\,p^k(1-p)^{n-k},$$
where $p$ is the probability of the coin coming up heads. In our case, the coin is fair, so $p=\frac12$ and the expression reduces to $\mathbb P(X=k)=\binom{n}k\,2^{-n}$. We hence need to look for solution to
$$\binom{n}5\,2^{-n}-\binom{n}4\,2^{-n}=\binom{n}6\,2^{-n}-\binom{n}5\,2^{-n}$$
which simplifies to
$$\binom{n}5-\binom{n}4=\binom{n}6-\binom{n}5.$$
Consider the following manipulations:
\begin{align} &2\,\binom{n}{5}=\binom{n}6+\binom{n}4\\ \iff &4\,\binom{n}{5}=\left(\binom{n}6+\binom{n}5\right)+\left(\binom{n}5+\binom{n}4\right)\\ \iff &4\,\binom{n}{5}=\binom{n+1}6+\binom{n+1}5\\ \iff &4\,\binom{n}{5}=\binom{n+2}6\\ \iff &4\,\frac{n!}{5!\,(n-5)!}=\frac{(n+2)!}{6!\,(n-4)!}\\ \iff &4=\frac{(n+2)(n+1)}{6(n-4)}\\ \iff &24(n-4)=(n+2)(n+1) \end{align}
At this point, it's a matter of checking against the given options.
If you want a more analytical route, you can observe that $n+2$ and $n+1$ are always coprime, so they cannot share any prime divisors of $24=8\times 3$. In particular, we must have one of
Notice that if $n+2$ is a multiple of $8$, then $n$ is even and hence $n-4$ is also even, which justifies (2).