1. ## Number theory proof

Show that the integer n is even if and only if n - 2[n/2] = 0

Thanks very much.

2. Originally Posted by suedenation
Show that the integer n is even if and only if n - 2[n/2] = 0

Thanks very much.
Does n - 2[n/2] = 0 means $n - 2\frac{n}{2} = 0$?

3. Originally Posted by OReilly
Does n - 2[n/2] = 0 means $n - 2\frac{n}{2} = 0$?
Why LaTex isn't shown?!

4. Originally Posted by OReilly
Why LaTex isn't shown?!
The software driving MHF has been upgraded and LaTeX has not
yet been reinstalled.

RonL

5. Originally Posted by OReilly
Does n - 2[n/2] = 0 means $n - 2\frac{n}{2} = 0$?
It should mean that there exists a k in N, such that:

n=2k

It could be either the floor, ceiling of some sort of nearest integer function,
as these are n/2 if this is an integer, and something else if not an integer.

RonL

6. Originally Posted by suedenation
Show that the integer n is even if and only if n - 2[n/2] = 0

Thanks very much.
1. Suppose n is even, then it may be written n=2k, for some k in N.
Then n-2[n/2]=2k-2[k], but k is in N so [k]=k, therefore n-2[n/2]=2k-2k=0.

Which is half of the proof, we have proven that if n is even n-2[n/2]=0

2. Suppose n-2[n/2]=0, now n is in N, so may be written n=2k+r, where
r is in {0,1}. Then n/2=k+r/2, so [n/2]=k (assuming that [x] denotes the
greatest integer less than x, make your own arrangements for other
intended meanings), therefore n-2[n/2]=2k+r-2k, but this is zero, therefore
r=0, and so n is even.

Which is the other half of the proof, as we have proven that if n-2[n/2]=0
then n is even.

RonL

7. Originally Posted by CaptainBlack
1. Suppose n is even, then it may be written n=2k, for some k in N.
Then n-2[n/2]=2k-2[k], but k is in N so [k]=k, therefore n-2[n/2]=2k-2k=0.

Which is half of the proof, we have proven that if n is even n-2[n/2]=0

2. Suppose n-2[n/2]=0, now n is in N, so may be written n=2k+r, where
r is in {0,1}. Then n/2=k+r/2, so [n/2]=k (assuming that [x] denotes the
greatest integer less than x, make your own arrangements for other
intended meanings), therefore n-2[n/2]=2k+r-2k, but this is zero, therefore
r=0, and so n is even.

Which is the other half of the proof, as we have proven that if n-2[n/2]=0
then n is even.

RonL
Perhaps I'm not seeing something here, but shouldn't we also be showing that if n is odd then n - 2[n/2] is not 0? (It's not hard to do, it just seems necessary.) 2. already shows that if n - 2[n/2] = 0 then n is even so we don't have to cover any other case.

-Dan

8. Originally Posted by topsquark
Perhaps I'm not seeing something here, but shouldn't we also be showing that if n is odd then n - 2[n/2] is not 0? (It's not hard to do, it just seems necessary.) 2. already shows that if n - 2[n/2] = 0 then n is even so we don't have to cover any other case.

-Dan
No. If and only if means that if n - 2[n/2] = 0, then n is even, and if
n is even then n - 2[n/2] = 0.

It is a short hand for bi-implication.

Also as a consequence if n is not even then n - 2[n/2] != 0, similarly
if n - 2[n/2] != 0 then n is not even.

RonL