I need to prove that is divisible by 8 iff is odd
I wrote , where . . . . no
does not have to be even.
can be any integer, and will be odd.
So we have: .
We see that is divisible by 4.
Since is the product of two consecutive integers,
. . one of them is even, the other is odd.
Hence: . is divisible by 2.
Therefore, is divisible by 8.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
It said if and only if, so we must prove it "the other way."
. . If is divisible by 8, then is odd.
We have: . is divisible by 8.
. . Then: . , for some integer
And we have: .
We see that is even . . . hence: is odd.
. . So we have: .
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: . is odd.
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.
I see you have edited your post, but I will post my response anyway since it is already written.
The statement "If then " which can also be written as only if means that if is true, then must also be true (but it might be possible for to be true even though is false).
The statement if means that if is true, then must also be true (but it might be possible for to be true even though is false).
The statement if and only if means that if is true, then must also be true, and if is true, then must also be true. Do you see how the implication goes both ways?
When proving a statement like you need to prove both of these statements:
1. If then
2. If then