Prove that if n is not divisible by 3 then n^2-1 is divisible by 3

Given

If n is not divisible by 3 then n2-1 is divisible by 3 ∀ n ∈ Z

Proof

For the value of n, we have 3 choices

Case 1 : n % 3 = 1

Let,

P = (n2-1) % 3

P = ( ( n2 ) % 3 – 1 % 3 ) % 3

P = ( ( n % 3 ) ( n % 3 ) – 1 ) % 3

P = ( 1 * 1 – 1 ) % 3

P = 0 % 3

P = 0

Therefore, n2-1 is divisible by 3 if n % 3 = 1

Case 2 : n % 3 = 2

Let,

P = (n2-1) % 3

P = ( ( n2 ) % 3 – 1 % 3 ) % 3

P = ( ( n % 3 ) ( n % 3 ) – 1 ) % 3

P = ( 2 * 2 – 1 ) % 3

P = 3 % 3

P = 0

Therefore, n2-1 is divisible by 3 if n % 3 = 2

Case 2 : n % 3 = 0

P = ( n2 – 1 ) % 3

P = ( ( n2 ) % 3 – 1 % 3 ) % 3

P = ( ( n % 3 ) ( n % 3 ) – 1 ) % 3

P = ( 0 * 0 – 1 ) % 3

P = -1 % 3

P = 2

Therefore, n2+2 is not divisible by 3 if n % 3 = 0

From the above cases, we can conclude that If n is not divisible by 3 then n2-1 is divisible by 3 ∀ n ∈ Z.

Leave a Comment

Your email address will not be published. Required fields are marked *