# Find all numbers such that “Product of all divisors=cube of number”.

While solving some old olympiad problems I came across this one. As I m stuck at it, so I m here.

The problem is: Find all positive integers $N$ such that the product of all the positive divisors of N is equal to $N^3$.

Since I was not able to solve this one mathematically hence I tried Hit and trial method to find the pattern and then work upon it. I got that:

12 has divisors 1,2,3,4,6,12 product of all of which give 1728($12^3$).Similarly 18,20,28 also follow the same case. I noticed that all of them have 4 factors, but I don't think it can take me any further (I also think that a perfect power(such as $2^3$)will not follow the case).

After all of my efforts I m on U guys. Need help. Any Mathematical formulation or suggestion is heartily welcome. Thanks.

• Well, I would imagine this means there are exactly 4 factors. The number, 4 factors, and 1 all multiply to be n^3. – The Great Duck Nov 9 '16 at 1:39
• Yup..Pattern which i have got says the same thing. – Vidyanshu Mishra Nov 9 '16 at 3:49

Note that $\displaystyle\left(\prod_{d \mid n} d\right)^2 =\prod_{d \mid n} d \prod_{d \mid n} \frac{n}{d} =n^{\tau(n)}$.

Therefore, we seek $n$ such that $n^{\tau(n)}=n^6$, that is, $n=1$ or $\tau(n)=6$.

Write $n=\prod_p p^{e_p}$. Then $\tau(n)=\prod_p (1+e_p)$. There aren't many possibilities if this is to be $6$ because each possibility corresponds to a factorisation of $6$:

• $6=6$ gives $n=p^5$.

• $6=2\cdot 3$ gives $n=pq^2$.

• Don't forget about $n=1$. – Inactive - avoiding CoC Nov 8 '16 at 21:46
• @Servaes, right! – lhf Nov 8 '16 at 21:49

Let $P(n)=\prod_{d\mid n}d$ the product of all positive divisors of $n$. denote by $\tau(n)$ the number of divisors of $n$. Then $$P(n)=\sqrt{n^{\tau(n)}}.$$ For example, with $n=12$ we have $\tau(12)=6$ and $P(n)=\sqrt{12^6}=12^3$. So we have to solve $$P(n)=\sqrt{n^{\tau(n)}}=n^3.$$ This means $n^{\tau(n)}=n^6$, or just $\tau(n)=6$.

• You need some more justification of the first display formula. It comes from pairing up two divisors that multiply to $n$, but you need to say that. Then you need to account for the case where $n$ is a perfect square. It still works, but needs justification. – Ross Millikan Nov 12 '16 at 3:54
• Yes, I know this; by the time of writing my answer another answer was already coming up with it, so I left it this way. – Dietrich Burde Nov 12 '16 at 9:13
• @RossMillikan There is no need to separately consider the case where $n$ is a square: just observe that $P(n)^2 = n^{\tau(n)}$ by pairing $d$ in the first product with $n/d$ in the second. – Erick Wong Nov 22 '16 at 18:34

If $$n=\prod_ip_i^{e_i}$$ and $$E=\prod_i(e_i+1)$$ then the number of factors of $p_i$ in the product is $\frac{e_i^2+e_i}2\prod\limits_{j\ne i}(e_j+1)=\frac{e_i^2+e_i}2\frac{E}{e_i+1}=Ee_i/2$.

Thus, the product of all the divisors is $$\prod_ip_i^{Ee_i/2}$$ So we need $E=6$ or all the $e_i=0$.

Thus, the number is either $1$, a prime to the fifth power, or the product of two primes, one to the first power and the other to the second power.

Examples

$2^5=32$: $1\cdot2\cdot4\cdot8\cdot16\cdot32=32768=32^3$

$2^2\cdot3=12$: $1\cdot2\cdot3\cdot4\cdot6\cdot12=1728=12^3$

Hint: The way to go is by prime factorisation. You need only consider the case up to four distinct prime factors (the rest should follow easily from your discussion). If you realise, all your found examples follow the pattern $pq^2$, where $p,q$ are primes.

• yeah I thought that number i m finding should have 4 factors(excluding the number itself).Should I write the answer that every number of the form pq^2, where p,q are primes follows – Vidyanshu Mishra Nov 8 '16 at 16:13
• $p^5$ also works – robjohn Nov 12 '16 at 3:34

If p is prime

$N= p^5$ - all divisors product is $p \ p^2 p^3 p^4 p^5 = p^{15} = N^3$

• $p\,q^2$ also works. – robjohn Nov 12 '16 at 3:33

Question:

Take a number N. Find N such that P(n)=n^3 where P(n) is a function that multiplies ALL the factors of that number.

All of the listed numbers are answers that I found
P(1)=1     N^3=1
P(12)=1728 N^3=1728
P(909)=(1x3x9x101x303x909) N^3=909*909*909


What to look for is when all the factors of the number without the number itself equal the number squared. The first thing to note is that the solutions are not prime, because then P(n)=n. Also, that first example (12) has 6 factors (1,2,3,4,6,12) Other numbers with 6 factors are multiplication of a prime number and a square of a prime, because 101*9 is 909, and factors of 909 are 1, 3, 9, 101, 303, 909, and since 3x303 and 9x101 both equal 909, 909 is a valid solution. So now there are an infinite amount of numbers that have 6 factors. Although this examples listed are arbitrary, the math holds.

If you think about it, and seeing that I don't have as great of math skill as the people before me, the factors are the key. If N has 6 factors, then P(n) is equal to n^3. NOT SAYING THERE ARE NO OTHER SOLUTIONS. So if there are other solutions, I do not know of them. All of the solutions that you provided have 6 factors, so therefore, yes, all those are solutions.

And all others variations of this puzzle, for instance instead of cubing N, we could square N, and then all numbers with 4 factors (cubes of primes, 2 primes multiplied by each other, et cetera) would be a solution, or leave it alone (raising it to a power of 1), then we get all the primes.

I should mention a growing pattern that for any integer K and any integer N, if P(N)=N^K, then N has 2K factors, guaranteed.