A smart way to do this question. Let $S=\{0,1,2,\dotsc,25\}$
And $T=\{n\in S : n^2+3n+2\text{ is divisible by }6\}$
Then the number of elements in $T$ is? 
One way I know is to factorise it as $(n+1)(n+2)$. 
And then put each $n$ and check whether we get a $2$ and $3$  or their multiples in the factors. 
However it is a bit time consuming. 
So I ask for a smarter(quicker) way if any,  to this? 

As $(n+1)(n+2)$ is product of two consecutive integers, $2\mid(n+1)(n+2)$
Again, $3\mid(n+1)(n+2)\implies$ 
either $3\mid(n+1)\iff n\equiv-1\equiv2\pmod3$
or $3\mid(n+2)\iff n\equiv-2\equiv1\pmod3$
Also, though not required here, $3$ can not divide both as $(n+2,n+1)=1$
