2n+1 can be written as (3−1)n+1
=[3n+(−1)n+a multiple of 3]+1
=(−1)n+1+a multiple of 3
Therefore 2n+1 is divisible by 3 if and only if (−1)n+1 is divisible by 3.
If 'n' is even , (−1)n+1=2, which is not divisible by 3.
If 'n' is odd , (−1)n+1=0, which is divisible by 3.
Therefore 2n+1 is divisible by 3 if and only if n is odd.