If n is a positive integer and r is reminder when (n-1)(n+1) is divided by 24, what is the value of r?
1. n is not divisible by 2
2. n is not divisible by 3
Its a DS question.
Ans is both together suffiecient.
Sol.
(n^2 -1)/24
1. n is not even
n can't be 0
so possible values
3 ==> rem 8
5 ==> rem 0
7 ==> rem 0
9 ==> rem 8
11 ==> rem 0
13 ==> rem 0
15 ==> rem 8
2. n is not divisible by 3
Thus by 1 & 2, rem is 8
Ans 3
Is the above approach correct ?
Is there any shortcut for this ?