prove that if n is an integer and 3n+2 is even, then n is even using

a)a proof by contraposition
b)a proof by contradiction

I'll try part b, you'll have to refresh me on what contraposition means here.
Here is the claim we start with
If n is an integer and 3n+2 is even, then n is even.
Reduction as absurdum or proof by contradiction begins by assuming the conclusion is false and then showing this contradicts one of the premises, thereby showing the conclusion is true.
Suppose n is odd, then 3n is odd since the product of odd integers is an odd int. Every odd int. + and even int. is odd. Show this by adding 2k+1 + 2m = 2(k+m)+1 = an odd number. Therefore 3n+2 is an odd number, but this contradicts the assumption that 3n+2 is even. Therefore if 3n+2 is even then n is even.
I think contraposition would be: If n is even then 3n+2 is even. You should be able to do this I think.

Let's go through part a using proof by contraposition. In a proof by contraposition, we aim to prove the contrapositive of the original statement. The contrapositive of the statement "If A, then B" is "If not B, then not A."

The original statement is "If n is an integer and 3n+2 is even, then n is even."
The contrapositive of this statement is "If n is an integer and n is odd, then 3n+2 is odd."

To prove the contrapositive, we assume that n is odd and then show that 3n+2 is odd.
Let's assume that n is odd, which means n can be written as 2k+1 for some integer k.
Plugging this value of n into the expression 3n+2, we get:
3(2k+1) + 2 = 6k + 3 + 2 = 6k + 5.

We can rewrite 6k + 5 as 2(3k + 2) + 1, which is of the form 2m + 1, where m = 3k + 2.
Since 2m + 1 is an odd number, we have shown that if n is odd, then 3n+2 is odd.

This proves the contrapositive statement, which then implies that the original statement is true:
"If n is an integer and 3n+2 is even, then n is even."

You are correct. Here's the proof by contraposition:

To prove that if $n$ is an integer and $3n+2$ is even, then $n$ is even, we can prove the contrapositive statement:

If $n$ is odd, then $3n+2$ is odd.

Proof by contraposition begins by assuming the negation of the conclusion (which is the opposite statement), and then showing that this contradicts one of the premises.

Assume that $n$ is odd. By definition, an odd integer can be written as $2k+1$ for some integer $k$.

Substituting this representation of an odd integer into the expression for $3n+2$, we have:

$3n+2 = 3(2k+1) + 2 = 6k + 3 + 2 = 6k + 5$

Now, notice that $6k$ is always divisible by $2$ because $6k = 2(3k)$, and $5$ is odd.

The sum of an even number and an odd number is always odd. Therefore, $6k + 5$ is odd.

This contradicts the assumption that $3n+2$ is even.

Hence, if $3n+2$ is even, then $n$ must be even.