# If n is a natural number and n^2 is odd, then n is odd

1. ### mrchris

31
1. The problem statement, all variables and given/known data
if n is a natural number and n2 is odd, then n is odd

2. Relevant equations
odd numbers: 2k+1, where k is an integer
even numbers: 2K, where k is an integer

3. The attempt at a solution
ok so take the opposite to be true, or n2 is odd and n is even. Then we would have n2= 2p+1 and n=2k, where p and k are both integers. then take n2= (2k)2= (22)(k2)= 4k2
Then set 2p+1= 4k2
4k2-2p=1
2(2k2-p)=1
(2k2-p)=1/2
but since we know 2k2 is an integer because it is just the product of 3 integers, 2*k*k, and we also know p is an integer by definition, we also know that (2k2-p) is an integer because it is the subtraction of two integers. This leaves us with a contradiction since we know (2k2-p) can not equal 1/2, hence proof is complete.

2. ### Robert1986

828
OK, I didn't really carefully look at your proof, but it seems to be correct.

HOWEVER, this is not a very satisfying proof. In Number Theory, we are VERY concerned with PRIME FACTORS of numbers. Now, I am going to give you two hints. Let $n = p_1^{k_1}\cdots p_m^{k_m}$ be the prime factorisation of $n$. NOW, what is the prime factorisation of $n$ (just square the one for $n$. That was hint #1. Here is hint #2: In terms of prime factors, what does it mean for a number to be odd or even?

Now, use prime factorisations and properties of primes to give what is essentially a 1 line proof.

3. ### HallsofIvy

41,262
Staff Emeritus
Statement: if n^2 is odd then n is odd.

Contrapositive: if n is even then n^2 is even.

Prove the statement by proving the contrapositive.
"if n is even" we can write n= 2k for some integer k. What is n^2?

(I would NOT use "prime factorization.)

4. ### Robert1986

828
Why not use prime factorisation? For example:

EDIT:
I gave the answer here. So I deleted it.

I didn't mean to suggest that he should write out the prime factorisation of $n$ as I did, I just did that to explain. The proof that I did have above was a direct proof (not that there is anything wrong with contrapositive) and is one line.

5. ### mrchris

31
Thanks for the advice, both of your answers seem to make sense, but I am in an analysis class and I can only use what I've learned in the class so far in my proofs. We definitely haven't worked with prime factorization officially yet, so even though that argument may be more straight forward, I can't use it. As for the contrapositive, we havent learned that either (which seems weird to me because it is commonly used for analysis online), so that is off limits as well.

6. ### Robert1986

828
???
This seems very strange to me. So you did learn (in an analysis class) that an odd number has the form 2k+1 but no one mentioned that integers have prime factorisations? And you are not allowed to use contrapositive?

Is this class on some odd schedule and is it just now beginning?