Let . Prove that if and only if .

Attempt at Proof:

First I just dealt with the forward implication: if then . To prove this I took the contrapositive of this statement which is: If , then .

can be broken down into 3 cases, the case I'm having trouble with is: let , then and then which is an even number and so , but that's not what I wanted for the contrapositive.

What am I doing wrong?

Thanks in advance.