Given positive integer $p,q,r$ with $p=3^{q}\cdot 2^{r}$ and $100<p<1000$. The difference between maximum and minimum values of $(q+r)$ is?
My tries
It's clear that $p=6k$ for some positive integer $k$
Hence, $6*17=102\neq 3^{q}\cdot 2^{r}$, on trying next one $6*18=108=3^3\cdot2^2$ .Hence min $(q+r)=5$
Similarly, $972=6*162=3^52^2$, max $(q+r)=7$
difference $=2$, but didn't matched with answer given.
please help.
You're finding the largest number of the form $2^p 3^q$, but that doesn't maximize $p+q$. As $2<3$ getting at high exponent on $2$ makes a smaller number than getting a high exponent of $3$. Trying the powers of $2$, we quickly find that $256=2^8$ is the highest that we can multiply by three and stay below $1000$.
Similar considerations might be relevant to find $\min(p+q)$.
And note that I haven't in any way proved that you'll find the $\min/\max$ this way, that's left for you.