# P is a natural number. 2P has 28 divisors and 3P has 30 divisors. How many divisors of 6P will be there?

While answering Aptitude questions in a book I faced this question but not able to find the solution So I searched Google and got two answers but didn't get an idea how the answer came.

Question:

P is a natural number. 2P has 28 divisors and 3P has 30 divisors. How many divisors of 6P will be there?

Solution 1:

2P is having 28(4*7) divisors but 3P is not having a total divisors which is divisible by 7, so the first part of the number P will be 2^5.

Similarly, 3P is having 30 (3*10) divisors but 2P does not have a total divisors which is divisible by 3. So 2nd part of the number P will be 3^3. So, P = 2^5*3^3 and the solution is 35.

Solution 2:

2P has 28 divisors =4x7,

3P has 30 divisors

Hence P=2^5 3^3

6p =2^6 3^4

Hence 35 divisors

I have been trying to understand the steps but not able to get.

hint

Let the prime factorization of $P=2^{a} \cdot 3^{b} \cdot 5^{c} \cdot 7^{d} \ldots$. Then the number of divisors of $P$ is given by $$(a+1)(b+1)(c+1)\ldots.$$

If $2P$ has $28$ Divisors then $$(a+2)(b+1)(c+1)\ldots=28.$$

Likewise If $3P$ has $30$ Divisors then $$(a+1)(b+2)(c+1)\ldots=30.$$

I hope now you can understand the solutions you found. If not let me know I will elaborate.

To understand the answer you should know how to find the number of divisors of a number from its prime factorization: The number $n=2^a3^b5^c7^d\cdots p^k$ has exactly $\tau(n)=(a+1)(b+1)(c+1)\cdots(k+1)$ divisors.

So if $P=2^a3^b5^c\cdots$ then $2P$ has $\tau(2P)=(a+2)(b+1)(c+1)\cdots$ divisors and $3P$ has $\tau(3P)=(a+1)(b+2)(c+1)\cdots$ divisors. The first solution observes that $7\mid \tau(2P)$ and $7\nmid \tau(3P)$, hence we must have $7\mid a+2$. (Note: In the form written in the OP, the conclusion that $a+2=7$ is a bit too hasty). Similarly, $3\mid \tau(3P)$, $3\nmid \tau(2P)$ tells us that $3\mid b+2$ (and not immediately $3=b+2$). We learn little about $c$ etc., i.e., about primes $\ge 5$ dividing $P$.

So let us justify the conclusions made: While $7\mid a+2$ allows $a+2$ to be any of $7,14,21,28$, we know that $a+1\mid \tau(3P)$, but of the number $6,13,20,27$ only $6$ is in fact a divisor of $\tau(3P)=30$. Thus we can indeed conclude that $a=5$. With this in mind, we know that $(b+1)(c+1)\cdots = \frac{\tau(2P)}{a+2}=4$ and $(b+2)(c+1)\cdots =\frac{\tau(3P)}{a+1}=5$. We conclude as above that $5\mid b+2$ and - this time in fact directly - $5=b+2$.

• The fact that $7 \mid \tau(2P)$ and $7 \nmid \tau(3P)$ immediately shows that either $7 \mid (a+2)$ or $7 \mid (b+1)$, since all other factors of $\tau(2P)$ are shared by $\tau(3P)$. It turns out that you can't have $7 \mid (b+1)$, because the choices for $(b+1)$ would be $7, 14, 21, 28$, leading to choices of $8, 15, 22, 29$ for $(b+2)$. Of these, only $15$ is a divisor of $30$, so we would have $b+1 = 14$ and $b+2 = 15$. But this yields $a+2 = a+1$, a contradiction. So indeed $7 \mid (a+2)$. Is there a faster way to conclude that $7 \mid (a+2)$? – mathmandan Jan 12 '16 at 23:05
• @mathmandan I suppose I had something in mind when I posted this (after all, otherwise my conclusion would be half as hasty as the original one ...), but I don't see it anymore. Or maybe I didn't have it after all. - But we know that $(c+1)\cdot\ldots$ is a divisor of $\gcd(\tau(2P),\tau(3P))=2$, so we might as well solve $(a+2)(b+1)=28\land (a+1)(b+2)=30$ as well as $(a+2)(b+1)=14\land (a+1)(b+2)=15$. In the first case $a-b=30-28=2$, so $(a+2)(a-1)=28$, leading to $a=5$, $b=3$, $P=32\cdot 27$; in the second case $a-b=1$, so $(a+2)a=14$, which is impossible. – Hagen von Eitzen Jan 15 '16 at 18:15

First, we want to know how to easily calculate the number of divisors of any number. If we have $n=p_1^{e_1}p_2^{e_2}\cdots p_k^{e_k}$ where all $p_i$ are distinct, then to construct a divisor we have $e_1+1$ choices for the number of factors $p_1$ in our divisor, $e_2+1$ choices for the number of factors $p_2$, etc., making the number of divisors equal to $(e_1+1)(e_2+1)\cdots (e_k+1)$. So for example, $12=2^2\cdot 3$ so $12$ has $(2+1)(1+1)=6$ divisors.

Let's look at the first hint now, $2P$ having 28 divisors. Let's write $2P=p_1^{e_1}p_2^{e_2}\cdots p_k^{e_k}$. The number of divisors is now $(e_1+1)(e_2+1)\cdots (e_k+1)=28$. So, we can say that one power, say $e_1$, must be either $6,13$ or $27$ (since 28 has a factor 7, and we assumed it was contained in $e_1+1$. Our options are now: $$2P=p_1^6\cdot p_2\cdot p_3$$ $$2P=p_1^6\cdot p_2^3$$ $$2P=p_1^{13}\cdot p_2$$ $$2P=p_1^{27}$$ The second hint says that 3P has 30 divisors. Since this does not contain a factor 7, we know that the $2$ in $2P$ must be responsible for this (notice that follows $e_1$ is the power of 2 in $2P$). Thus we know that $p_1=2$. Now we can, by our previously stated options, calculate P. $$P=2^5\cdot p_2\cdot p_3$$ $$P=2^5\cdot p_2^3$$ $$P=2^{12}\cdot p_2$$ $$P=2^{26}$$ In the third option, the number of divisors of $3P$ must be divisible by $12+1=13$, and in the last case, the number of divisors of $3P$ must be divisible by $27$. We conclude the last two are not possible, since 30 is not divisible by either 13 or 27. In the first case, the number of divisors of $3P$ is divisible by $6$ because of the amount of factors 2, and we also know that $3P$ there has (at least) one prime factor that it only contains one time, so we have another factor 2 in the number of divisors of $3P$. Now the number of divisors of $3P$ is divisible by $12$, which is also impossible ($12$ does not divide $30$). We conclude that $P$ must be of the form $p_1^5\cdot p_2^3$. We also know that if $p_2\neq 3$, then the number of divisors of $3P$ is divisible by $6$ because of the factors 2 and by $4$ because of the factors $p_2$. This is again impossible.

Finally, we must have $p_2=3$ so $P=2^5\cdot 3^3$. Now we can easily calculate the number of divisors of $6P$; it must be $(6+1)(4+1)=35$.

Hope this helped!