show that one and only out of n,n+2 or. n +4 is divisble by 3 where n is any positive integer
Answers
To Show
One and only one out of n, (n + 2) and (n + 4) is divisible by 3 where n is any positive integer.
Solution
Any positive integer can be represented in the form of a = bq + r where, 0 ≤ r < b.
So, when b = 3, r can be 0, 1 or 2
Hence, n can be represented as 3q, 3q + 1 or 3q + 2
Case 1 : n = 3q
Here, n = 3q, which clearly means that n is divisible by 3.
n + 2 = 3q + 2. Since, 2 is not divisible by 3, 3q + 2 is not divisible by 3. This means (n + 2) is not divisible by 3
n + 4 = 3q + 4. Since, 4 is not divisible by 3, 3q + 4 is not divisible by 3. This means (n + 4) is not divisible by 3.
This means that when n = 3q, only n is divisible by 3.
Case 2 : n = 3q + 1
Here, n = 3q + 1, which means that n is not divisible by 3.
n + 2 = 3q + 1 + 2 = 3q + 3 = 3(q + 1) = 3m, for some integer m such that m = (q + 1).
Since 3m is divisible by 3, (n + 2) is divisible by 3
n + 4 = 3q + 1 + 4 = 3q + 5. Since 5 is not divisible by 3, 3q + 5 is not divisible by 3. This means that (n + 4) us not divisible by 3.
This means that when n = 3q + 1, only (n + 2) is divisible by 3.
Case 3 : n = 3q + 2
Here, n = 3q + 2, so clearly n is not divisible by 3.
n + 2 = 3q + 2 + 2 = 3q + 4. Again, 3q + 4 is not divisible by 3 so (n + 2) is not divisible by 3.
n + 4 = 3q + 2 + 4 = 3q + 6 = 3(q + 2) = 3m, for some integer m such that m = (q + 2).
Since, 3m is divisible by 3, (n + 4) is divisible by 4.
This means that when n = 3q + 2, only (n + 4) is divisible by 3.
Now, as we have seen, that for a particular value of n, only one of (n), (n + 2), (n + 4) is divisible by 3. Thus, for any positive integer n, one and only one of n, (n + 2) or (n + 4) is divisible by 3.
Answer
let the number divisible by 3 is in the form
3k + r, where r can be 0, 1 or 2
So, a = 3k , 3k + 1 or 3k + 2
Case 1 : when a = 3k
n = 3k { n is divisible by 3 }
n + 2 = 3k + 2 { n + 2 is not divisible by 3 }
n + 4 = 3k + 4
= 3k + 3 + 1
= 3(k + 1) + 1 { n + 4 is not divisible by 3 }
=> So, only one out of n, n+2 and n+4 is divisible by 3, i.e (n)
Case 2 : When a = 3k + 1
n = 3k + 1 { n is not divisible by 3 }
n + 2 = 3k + 1 + 2
= 3k + 3
= 3(k + 1) { n + 2 is divisible by 3 }
n + 4 = 3k + 1 + 4
= 3k + 5
= 3k + 3 + 2
= 3(k + 1) + 2 { n + 4 is not divisible by 3 }
=> So, only one out of n, n+2 and n+4 is divisible by 3, i.e (n+2)
Case 3 : When a = 3k + 2
n = 3k + 2 { n is not divisible by 3 }
n + 2 = 3k + 2 + 2
= 3k + 4
= 3k + 3 + 1
= 3(k + 1) + 1 { n + 2 is not divisible by 3 }
n + 4 = 3k + 2 + 4
= 3k + 6
= 3(k + 2) { n + 4 is divisible by 3 }
=> So, only one out of n, n+2 and n+4 is divisible by 3, i.e (n+4)
★ Here from the above we can see that only one out of numbers n, n+2, and n+4 is divisible by 3 in each case