Find all numbers such that "Product of all divisors=cube of number".

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$.


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$.


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$