The Gateway to Computer Science Excellence
+1 vote

Let $S=\{0, 1, 2, \cdots 25\}$ and $T=\{n \in S: n^2+3n+2$ is divisible by $6\}$. Then the number of elements in the set $T$ is

  1. $16$
  2. $17$
  3. $18$
  4. $10$
in Numerical Ability by Boss (17.5k points)
recategorized by | 62 views

2 Answers

+3 votes
$n^2+3n+2$ should be divisible by $6$

and for divisible by $6$ it should be divisible by both $2$ and $3$


All even numbers are divisible by $2$.

$n^2+3n+2 = (n+1)(n+2)$

if $(n+1)$ is odd then $(n+2)$ will be even and vice versa

so the $(n+1)(n+2)$ will always be an even number.

Hence every number of the form $n^2+3n+2$ is divisible by $2$


So the problem now becomes $n^2+3n+2$ should be divisible by $3$

in the above equation $3n$ will always be divisible by $3$

hence the problem further reduces and becomes $n^2 +2$ should be divisible by $3$

($\because$ Any number is divisible by $3$ if the sum of digits of that number is divisible by $3$)


Now all the values that are multiple of $3$ would be eliminated

($\because$ square of multiples of $3$ are divisible by $3 \implies$ adding $2$ to them would make the square of the multiples indivisible by $3$)

Hence only $1,2,4,5,7,8,10,11,13,14,16,17,19,20,22,23,25$ are left. i.e. $17$ numbers

So option $B.$ is the correct answer.
by Boss (24.2k points)
0 votes

Given that n belongs to T if $n^{2}+3n+2$ is divisible by 6.

So we can say that n belongs to T if $(n^{2}+3n+2)$ $mod$ $6$$=0$

but $n^{2}+3n+2=(n+1)(n+2)$.

So $(n^{2}+3n+2)mod 6=((n+1)(n+2))mod6$


$(n^{2}+3n+2)mod 6=((n mod 6+1)(n mod 6 +2))mod 6$

let us check some elements from set S.

for n=0,$((n mod 6+1)(n mod 6 +2))mod 6$$=2$$\neq$0

Therefore,0 does not belong to T.

$\therefore 0+6,0+2*6,0+3*6,0+4*6$ does not belong to T

i.e.,$6,12,18,24$ doesn't belong to T.

for n=1,$((n mod 6+1)(n mod 6 +2))mod 6$$=0$

$\therefore 1$ belongs to T.

$\therefore 1,1+1*6,1+2*6,1+3*6,1+4*6$ belongs to T

i.e$1,7,13,19,25$ belongs to T.

for n=2,$((n mod 6+1)(n mod 6 +2))mod 6$$=0$.

$\therefore 2$ belongs to T.

$\therefore 2,2+1*6,2+2*6,2+3*6$ belongs to T

i.e$2,8,14,20$ belongs to T.

for n=3,$((n mod 6+1)(n mod 6 +2))mod 6$$=2$$\neq$0

Therefore,0 does not belong to T.

$\therefore 3,3+1*6,3+2*6,3+3*6$ does not belong to T

i.e.,$3,9,15,21$ doesn't belong to T.

for n=4,$((n mod 6+1)(n mod 6 +2))mod 6$$=0$.

$\therefore 4$ belongs to T.

$\therefore 4,4+1*6,4+2*6,4+3*6$ belongs to T

i.e$4,10,16,22$ belongs to T.

for n=5,$((n mod 6+1)(n mod 6 +2))mod 6$$=0$.

$\therefore 5$ belongs to T.

$\therefore 5,5+1*6,5+2*6,5+3*6$ belongs to T

i.e$5,11,17,23$ belongs to T.

Here we need not check further because we have indirectly checked all the other elements(i.e., 7-25) while checking 0 to 6..




Hence it's cardinality =17

Hence option B is the answer.

Here actually,$(n^{2}+3n+2)$mod 6 is =((n mod 6+1)mod 6 *(n mod 6 +2)mod 6)mod 6.

But i have written it as $(n^{2}+3n+2)$mod 6 =((n mod 6+1)(n mod 6 +2))mod 6$.

This is because, the modulo 6 (in the bold) just complicates the evaluation of expression.. and it's removal won't affect the answer..

by Active (4.6k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,385 answers
105,385 users