Proving n Has Odd # Divisors If Perfect Square

  • Thread starter cragar
  • Start date
  • Tags
    Proof
In summary, to prove that a positive integer n has an odd number of divisors if and only if it is a perfect square, we can either use prime factorization or group divisors into pairs. When n is not a square, the divisors occur in groups of two, resulting in an even number of divisors. However, when n is a perfect square, there will be one divisor that is not paired up, resulting in an odd number of divisors. This is the only way to guarantee that n will have an odd number of divisors.
  • #1
cragar
2,552
3

Homework Statement


Let n be a positive integer. Prove that n has an odd number of divisors if and only if n is a perfect square.

The Attempt at a Solution


Let's factor n into its prime factorization
[itex] n= {P_1}^{x_1}{P_2}^{x_2}...{P_j}^{x_r} [/itex]
where P's are prime numbers and x's are natural numbers.
Now in order to get all the divisors from the prime factors we need to take all the possible combinations of the prime factors, from 0 up to [itex] x_r [/itex]
So the number of divisors will be [itex] D=(x_1+1)(x_2+1)...(x_r+1) [/itex]
But if n is a perfect square then the number of divisors would be
[itex] D=(2x_1+1)(2x_2+1)...(2x_r+1) [/itex] and an odd number times an odd number is an odd number therefore if n is a perfect square then it will have an odd number of divisors.
And this is the only way to guarantee that it will have an odd number of divisors.
 
Physics news on Phys.org
  • #2
cragar said:

Homework Statement


Let n be a positive integer. Prove that n has an odd number of divisors if and only if n is a perfect square.

The Attempt at a Solution


Let's factor n into its prime factorization
[itex] n= {P_1}^{x_1}{P_2}^{x_2}...{P_j}^{x_r} [/itex]
where P's are prime numbers and x's are natural numbers.
Now in order to get all the divisors from the prime factors we need to take all the possible combinations of the prime factors, from 0 up to [itex] x_r [/itex]
So the number of divisors will be [itex] D=(x_1+1)(x_2+1)...(x_r+1) [/itex]
But if n is a perfect square then the number of divisors would be
[itex] D=(2x_1+1)(2x_2+1)...(2x_r+1) [/itex] and an odd number times an odd number is an odd number therefore if n is a perfect square then it will have an odd number of divisors.
And this is the only way to guarantee that it will have an odd number of divisors.

You can do it that way, but you can also do it without using prime factorization. Group divisors into pairs where you pair p and q into {p,q} when pq=n. Do you see how that would work?
 
  • #3
Im not sure exactly what you mean. when you say n=pq
for n to be a perfect square p=q, then [itex] n=p^2 [/itex]
Are you saying because its a perfect square I could group all the divisors together because it will have 2 of each.
 
  • #4
cragar said:
Im not sure exactly what you mean. when you say n=pq
for n to be a perfect square p=q, then [itex] n=p^2 [/itex]
Are you saying because its a perfect square I could group all the divisors together because it will have 2 of each.

I'm saying the divisors occur in groups of two. Unless it's a perfect square. Then you have one group of one.
 
  • #5
so because it is a perfect square, the divisors are doubled up, so were just repeating instead of having 2 distinct groups. because n=q*q
 
  • #6
cragar said:
so because it is a perfect square, the divisors are doubled up, so were just repeating instead of having 2 distinct groups. because n=q*q

Actually the divisors are doubled up when the number is not a square. Take 12. The groups are {1,12}, {2,6} and {3,4}. Since the divisors are all in groups of 2, the number of divisors is even. Now take 64, a perfect square. The groups are {1,64}, {2,32}, {4,16} and {8}. 8*8=64 so 8 is in a group all by itself. Hence the number of divisors is odd.
 
  • #7
Let d be any divisor or n (prime or composite) such that [itex]1 \leq d \leq n[/itex] (that covers all divisors). It's as trivial as observing that if [itex]d|n[/itex], then [itex]\frac{n}{d}|n[/itex]. Hence the divisors can be listed in pairs [itex](d,\frac{n}{d})[/itex] giving an even number of divisors (if one listed them all without being concerned about repeats). Where n is a perfect square, there will be exactly one divisor s such that [itex]s^2 = n[/itex] so [itex]\frac{n}{s} = s[/itex]. There will therefore be exactly one "repeated" pair [itex](s,s)[/itex]. If only unique divisors are now listed, s will occur only once, whereas there will be an even number of the other divisors. Hence the total number of divisors will be odd iff n is a square.
 
  • #8
Ok thanks for your posts everyone, I think I understand now.
 

1. How can you prove that a number has an odd number of divisors if it is a perfect square?

To prove that a number has an odd number of divisors if it is a perfect square, we can use the fundamental theorem of arithmetic. This theorem states that every positive integer can be expressed as a unique product of primes. Since a perfect square will have an even number of each prime factor, it will have an odd number of divisors.

2. Can this method be used for all perfect squares?

Yes, this method can be used for all perfect squares. The fundamental theorem of arithmetic applies to all positive integers, so it can be used to prove the number of divisors for any perfect square.

3. Is this the only way to prove that a number has an odd number of divisors if it is a perfect square?

No, there are other methods that can be used to prove this statement. One method is to use the prime factorization of the number and count the number of divisors. Another method is to use the properties of perfect squares and their divisors.

4. Are there any exceptions to this statement?

Yes, there are exceptions to this statement. A number can have an odd number of divisors even if it is not a perfect square. This can happen if the number is a product of two or more prime numbers that are raised to an odd power.

5. Can this concept be applied to other types of numbers?

Yes, this concept can be applied to other types of numbers. The fundamental theorem of arithmetic and other methods used to prove the number of divisors can be applied to all positive integers, not just perfect squares.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
541
  • Precalculus Mathematics Homework Help
Replies
9
Views
1K
  • Math Proof Training and Practice
Replies
12
Views
445
  • Calculus and Beyond Homework Help
Replies
13
Views
2K
  • Calculus and Beyond Homework Help
Replies
18
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
Replies
6
Views
816
Replies
6
Views
881
Back
Top