# Show that one and only one out of n; n + 2 or n + 4 is divisible by 3, where n is any positive integer. - Mathematics

Sum

Show that one and only one out of n; n + 2 or n + 4 is divisible by 3, where n is any positive integer.

#### Solution

Consider any two positive integers a and b such that a is greater than b, then according to Euclid's division algorithm:

a = bq + r; where q and r are positive integers and 0 ≤  r < b

Let a = n and b = 3, then

a = bq + r ⇒ n = 3q + r; where 0 ≤ r < 3.

r = 0 ⇒ n = 3q + 0 = 3q

r = 1 ⇒ n = 3q + 1  and r = 2 ⇒ n = 3q + 2

If n = 3q; n is divisible by 3

If n = 3q + 1; then n + 2 = 3q + 1 + 2 = 3q + 3; which is divisible by 3

⇒ n + 2 is divisible by 3

If n = 3q + 2; then n + 4 = 3q + 2 + 4

= 3q + 6; which is divisible by 3

⇒ n + 4 is divisible by 3

Hence, if n is any positive integer, then one and only one out of n, n + 2 or n + 4 is divisible by 3.

Hence the required result.

Concept: Euclid’s Division Lemma
Is there an error in this question or solution?

Share