# Sum of the digits of the least natural number P with conditions.

Find the sum of the digits of the least natural number P, such that the sum of the cubes of the four smallest distinct divisors of P equals 2P.

A.7 B.8 C.9 D. 10

I did like this:- for 1,2,3,6 2*P=1+8+27+216=252 P=126 all 1, 2, 3 and 6 are factors of 126 therefore digital sum=1+2+6=9 ans

Is there any short method as i took all three cases 1,2,3,4 and 1,2,3,5 and 1,2,3,6.

-
Since the solution is so small, you can't really beat brute force (you should have checked/ruled out $1,2,4,5$ however, since that leads to a smaller sum of cubes than $1,2,3,6$). – Daniel Fischer Aug 15 '13 at 11:07
what is the loss in the smaller sum of cubes. i din get your point. can you elaborate how shud i skip 1,2,4,5? – Ankesh Aug 15 '13 at 11:23
You want to find the smallest $P$ such that $2P$ is the sum of the cubes of the four smallest divisors of $P$. So when your answer is $P = 126$ with $2\cdot 126 = 1^3 + 2^3 + 3^3 + 6^3$, you need to give a reason why the combinations that lead to a smaller sum of cubes are not the solution. These combinations are $(1,2,3,4)$,$(1,2,3,5)$ and $(1,2,4,5)$. The quickest method is to compute the cube sums of all three and find they don't meet the requirements. – Daniel Fischer Aug 15 '13 at 11:30
that i had already done dude. because 1,2,3,4 gives sum of cubes as 100 which in turn tells P=50 but 50 do not meet the divisor condition for 3 and 4.. Similarly for 1,2,3,5 sum is 109 which is odd so p value is not possible. – Ankesh Aug 15 '13 at 11:33
Right. And you didn't mention that you did the same for $1,2,4,5$ with $1^3 + 2^3 + 4^3 + 5^3 = 1 + 8 + 64 + 125 = 198 < 252$ (whence $P = 99$; which is divisible by $3$, but not by $2,\,4$ or $5$). Why didn't you mention that one? Simply overlooked or tried and forgotten to mention are the most likely reasons. In either of these two cases, you should fix the mistake and mention it. If you have excluded that one from consideration for a deeper reason, mention that reason. – Daniel Fischer Aug 15 '13 at 11:38

Typo: "P is even" should be $2P$ is even. (And, I hate to say it, the triple $2,4,5$ has exactly one odd member, so unlike the $2,3,5$ triple is not excluded by that criterion.) But that aside, since the solution is so small, there is no better approach. If you wanted to find not only the smallest $P$ with that property, but all $P \leqslant N$ - for a reasonable $N$, then you could improve upon it by observing that the smallest divisor except $1$ must be a prime, call it $p$. The next smallest must be either $p^2$ or a prime $q > p$. If the next was $p^2$, the last one cannot be $p^3$, ... – Daniel Fischer Aug 15 '13 at 18:47
because then the sum of cubes would be $\equiv 1\pmod{p}$, so it must be a prime $q > p^2$ dividing $1+p^3+p^6$ such that $q^3 \equiv -1\pmod{p^2}$. That is very restrictive, no prime smaller than $10000$ has such a partner. If the third smallest divisor was a prime $q > p$, the last could be $p^2$ (but that requires $p > 10000$), $p\cdot q$ or a third prime $r > q$, but $r < pq$, and dividing $1+p^3+q^3$. If it's $pq$, you must have $p^3\equiv -1\pmod{q}$ and $q^3\equiv -1\pmod{p}$, which is again rather restrictive. – Daniel Fischer Aug 15 '13 at 18:48