# Just making sure I'm right: When is $\prod_{d|n} d=n^2$

I'm asked which Natural numbers $n$ uphold that the multiplication of all the divisors $>=1$ of n is equal to $n^2$

I got that for that to happen there has to be only 4 different divisors of $n$ who are prime, and so $n=p_1*p_2=p_3*p_4$ can never happen, and so there no Natural numbers of that nature.

is it correct?

-
What is the product of the divisors of 6? –  Steven Stadnicki Feb 5 at 21:33
There is a big difference between prime divisors, and (the usual positive) divisors. –  Calvin Lin Feb 5 at 21:34
ok so the only numbers are those who are $p*q$ ? –  Addar Bokobza Feb 5 at 21:34
But what is the product of the divisors of $4$? Or of $9$? –  Hagen von Eitzen Feb 5 at 21:35
then $n=p*q$ and $p\not=q$? and $p,q>1$ –  Addar Bokobza Feb 5 at 21:36
show 8 more comments

If $d$ is a divisor of $n$, then so is $n/d$, right? So we can write $$\prod_{d\mid n}d=1\cdot d_1 \cdot d_2 \cdot \cdots \cdot \frac{n}{d_2} \cdot \frac{n}{d_1} \cdot n$$ If $n$ has an even number $2m$ of divisors, the $d_i$'s cancel out and you're left with $n^m$. If $n$ has an odd number of divisors (i.e. $n=k^2$) then all the $d_i$'s cancel except for the $k$, so you're left with $n^m/k=k^{2m-1}$.

Thus if $\prod_{d\mid n}d=n^2$, we see that $n$ has four divisors, which is true if and only if $n=pq$ or $n=p^3$ (where $p,q$ are distinct primes).

-
Hint: For the most part, you can pair up the divisors of $n$. If there is a divisor $d$, there is also $\frac nd$. What is their product? How can this fail?