# Math Help - Perfect square s, odd number of factors

1. ## Perfect square s, odd number of factors

If a number is a perfect square, it will have an odd number of factors (e.g., 4 has factors 1, 2, 4), whereas all other numbers have an even number of factors.

Is the converse true? Please explain why?

2. ## Re: Perfect square s, odd number of factors

By converse, do you mean the following statement: "If a number has an odd number of factors, then it is a perfect square, and if a number has an even number of factors, then is it not a perfect square"? The original statement says that being a perfect square is equivalent to having an odd number of factors, so of course the converse is true.

3. ## Re: Perfect square s, odd number of factors

Yes, that's what I meant. But I am not convinced of the equivalence. Can you explain a bit further with the proof.

4. ## Re: Perfect square s, odd number of factors

Suppose that the number of factors of n is odd. We need to show that n is a perfect square. Suppose the contrary; then by the statement in post #1, n has an even number of factors, a contradiction.

In general, if you showed A implies B and (not A) implies (not B), then you showed that A and B are equivalent, so either one implies the other. Also, (not A) and (not B) are equivalent in this case.

5. ## Re: Perfect square s, odd number of factors

No, I meant if it's just given that, "If a number is a perfect square, it will have an odd number of factors (e.g., 4 has factors 1, 2, 4)"

Now how would you prove the converse?

6. ## Re: Perfect square s, odd number of factors

So, I understand that the part in post #1 after "whereas" is not given.

Without loss of generality, $n = p_1^{a_1}\cdot\ldots\cdot p_r^{a_r}$ for primes $p_1,\dots,p_r$. The number of factors of n is given by the divisor function $d(n)=(a_1+1)\cdot\ldots\cdot(a_r+1)$. If d(n) is odd, then all $a_i$'s are even, so $n = (p_1^{a_1/2}\cdot\ldots\cdot p_r^{a_r/2})^2$.

7. ## Re: Perfect square s, odd number of factors

Much obliged.

8. ## Re: Perfect square s, odd number of factors

Emakarov has given a first-rate proof, but I can't resist supplying a more basic proof that does not require knowledge of the properties of the divisor function.

Theorem: If n is not a square, then it has an even number of divisors.

Proof: Suppose x is a divisor of n, i.e. there is an integer y such that xy = n. Then y is also a divisor of n. (Here is the critical step.) Since n is not a square, x is not equal to y. So we have established a one-to-one correspondence between pairs of divisors of n, hence the number of divisors must be even.

Corollary (the contrapositive): If n has an odd number of divisors, then it is a square.

9. ## Re: Perfect square s, odd number of factors

Thanks, both of you guys!