1. ## [SOLVED] Please check proof

So I need to prove that $n^2 -1$ is divisible by 8 iff n is odd
I wrote n= 2P+1 where P = 2k

then $(2P+1)^2 - 1 = 4P^2+4P + 1-1$ subing 2k back in I get

16k^2+8k = 8(2k^2+k)

Is this okay?

2. Originally Posted by meg0529
So I need to prove that $n^2 -1$ is divisible by 8 iff n is odd
I wrote n= 2P+1 where P = 2k

then $(2P+1)^2 - 1 = 4P^2+4P + 1-1$ subing 2k back in I get

16k^2+8k = 8(2k^2+k)

Is this okay?
No. By setting $n=4k+1,$ you have only proven the statement for every other odd number: $\dots,\,-7,\,-3,\,1,\,5,\,9,\,13,\dots$.

Fortunately, you can fix it by handling the case for odd $P$ separately. Then you get $n=4k+3,$ and

$n^2-1=16k^2+24k+9-1=8(2k^2+3k+1).$

3. Hello, meg0529!

I need to prove that $X \:=\:n^2 -1$ is divisible by 8 iff $n$ is odd
I wrote $n\:=\: 2p+1$, where $p = 2k$ . . . . no

$p$ does not have to be even.
$p$ can be any integer, and $n$ will be odd.

So we have: . $X \:=\:n^2-1 \:=\:(2p+1)^2-1 \:=\:4p^2 + 4p \:=\:4p(p+1)$

We see that $X$ is divisible by 4.

$\text{Note that: }\:X \:=\:4\cdot\!\!\!\!\!\!\!\!\underbrace{p(p+1)}_{\t ext{consecutive integers}}$

Since $p(p+1)$ is the product of two consecutive integers,
. . one of them is even, the other is odd.
Hence: . $p(p+1)$ is divisible by 2.

Therefore, $X$ is divisible by 8.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

It said if and only if, so we must prove it "the other way."

. . If $n^2-1$ is divisible by 8, then $n$ is odd.

We have: . $n^2-1$ is divisible by 8.

. . Then: . $n^2-1 \:=\:8k$, for some integer $k.$

And we have: . $n^2 \:=\:8k + 1$

We see that $8k$ is even . . . hence: $8k+1$ is odd.

. . So we have: . $n^2 \:=\:\text{odd}$

It can be shown that:
. . If the square of an integer is odd, the integer is odd.

The proof is quite simple, but omitted here.

Therefore: . $n$ is odd.

4. Reckoner,

Ok I see your point, So you are saying I need to do this is two different steps? Is there a way for me to do this in one shot?

Thanks

5. Originally Posted by meg0529
Reckoner,

Ok I see your point, So you are saying I need to do this is two different steps? Is there a way for me to do this in one shot?
Certainly there is, and Soroban has provided it.

Take care.

Edit: Oh, and be sure you understand what is meant by "if and only if" (abbreviated iff). I misread your post initially and thought it only went one direction; there are basically two proofs that need to be made. Again, Soroban has this covered.

6. Got it. Thanks you both very much

7. I see you have edited your post, but I will post my response anyway since it is already written.

Originally Posted by meg0529
So If my sentence contains an if and only if in it, I should set it up as an If then statement?
No. An if-then statement means the implication goes in only one direction.

The statement "If $p,$ then $q,$" which can also be written as $\text{}p$ only if $q,\text{''}$ means that if $p$ is true, then $q$ must also be true (but it might be possible for $q$ to be true even though $p$ is false).

The statement $\text{}p$ if $q,\text{''}$ means that if $q$ is true, then $p$ must also be true (but it might be possible for $p$ to be true even though $q$ is false).

The statement $\text{}p,$ if and only if $q\text{''}$ means that if $p$ is true, then $q$ must also be true, and if $q$ is true, then $p$ must also be true. Do you see how the implication goes both ways?

When proving a statement like $p\text{ if{f} }q,$ you need to prove both of these statements:
1. If $p,$ then $q$
2. If $q,$ then $p$

8. Ya haha I re-read the chapter, thanks!