Prove that if $n^2 -2n +2$ is odd then $n$ is odd 
Prove that if $n^2 -2n +2$ is odd then $n$ is odd

I was wondering if you would prove this by using proof by contrapostive. I tried using proof by contrapostive, but I end up with the wrong answer.

Yes, you can. Assume that $n$ is even. Then $n=2k$ for some integer $k$. Now $n^2 - 2n + 2 = 4k^2 - 4k + 2 = 2(2k^2 - 2k + 1)$, which is $2$ times an integer, meaning that it is an even number.
