# Odd and even number proofs

Let $n$ be an integer. Prove that if $n^2+2n-1$ is even than $n$ is odd.

Proof: $$n^2+2n-1=2n$$ $$n^2-1=0$$ $$(n-1)(n+1)=0$$ $$n=-1,1$$

Which are odd. Is this a complete proof? I feel like it only proves $n=-1,1$ not an odd number.

• Your error is in the first statement, which should be $n^2 + 2n - 1 = 2 k$ (not $2 n$). – David G. Stork Feb 14 '17 at 23:50
• It the proof was correct, you would have proved that $n$ would have been either $-1$ or $1$ and (depending on the specificities of the definition of even and odd number) therefore the starting number would be odd. – Git Gud Feb 14 '17 at 23:51

## 4 Answers

You are making a mistake as follows: Suppose that $n^2+2n-1$ is an even number. This means it is two times some integer. But what you seem to be doing, is equating it to $2n$, which makes it a specific integer, since $n$ is fixed (once we calculate $n^2+2n-1$).

On the other hand, every even integer is given by $2k$, where $k$ is an integer.

To do this question, suppose that $n^2+2n-1 = 2k$, then transposing, $n^2-1 = 2(k-n)$. Hence, $(n-1)(n+1) = 2(k-n)$.

At this point, it is enough to see that if $n$ was even, both $n-1$ and $n+1$ are odd.

The right hand side is even (divisible by $2$), whereas the left hand side, being a product of odd numbers, is odd. This is a contradiction.

Hence, $n$ must be odd.

May I recommend the fact that $n^2-2n+1=(n-1)^2$. So if $n=k+1$, then $k^2$ is even, so $k$ must be even, i.e. $k=2j$ and so $n=2j+1$ is odd. Now your identity comes from the fact that

$$n^2+2n-1=(n-1)^2+2(2n-1)$$

so $(n-1)^2 = 2(j-2n+1)$ is even and we are back in the previous case.

A similar approach works by noting $n^2+2n+1=(n+1)^2$ so that $n^2+2n-1=(n+1)^2-2$.

The issue with your case is you just change from $2n$ to $0$ right away and neglect that there are other evens besides $2n$, you could instead note that $n^2-1=(n+1)(n-1)=2(k-n)$ is even so $n+1$ or $n-1$ is even, but both cases show that $n$ is odd by definition.

• may I ask in the first two sentences you have $n^2-2n+1=(n-1)^2$ and you say that is $n=k+1$ then $k^2$ is even. How do you know $k^2$ is even? that is not a given within the proof so should this be proved separately? @adamhughes – ECollins Feb 15 '17 at 0:02
• Working $\mod 2$ your proof becomes much easier, as the second term on the right side just vanishes. Then it is easy to see $n$ is odd. – Alfred Yerger Feb 15 '17 at 0:02
• @ECollins if you do not know that the product of two even numbers is even, you would prove it as a lemma. – Adam Hughes Feb 15 '17 at 0:03
• @AlfredYerger yes, I chose a proof with the definitions as the op's context strongly suggests he has no experience with modular arithmetic. – Adam Hughes Feb 15 '17 at 0:03

This would be be a good one to apply the contrapostive.

if $n^2 + 2n -1$ even $\implies n$ odd

then $n$ is even $\implies n^2 + 2n -1$ is odd

$(2k)^2 + 2(2k) - 1$ is odd

You could do this using modular arithmetic:

$n^2 + 2n - 1 \equiv 0 \pmod 2\\ n^2 \equiv 1 \pmod 2\\ n \equiv 1 \pmod 2$

Here is a proof your 7 year old nephew should be able to follow:

An even number less an even number is even.

An odd number less an odd number is even.

An even number less an odd number is odd.

An even number times any number is even.

An odd number times and odd number is odd.

If $n^2 + 2n -1$ is even.

then:

Since $2n$ is even $n^2 - 1$ is even, $n^2$ is odd.

if $n$ were even $n^2$ would be even.

$n$ is odd.

Consider:

$EVEN = 2 \cdot ODD$ as you have stated or in more academic way:

$EVEN = 2 \cdot ODD + 0||2$

Can you see the difference?

By the way:

$ODD = 1 \cdot 1 + EVEN$