2Thanks
• 1 Post By emakarov
• 1 Post By awkward

# Thread:

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!
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 5, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.911346971988678, "perplexity_flag": "head"}