Saturday, May 11, 2024

2024/034) For how many positive n less than 2025 $n^2+3n+2$ is divisible by 6

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

This is divisible by 2 for any n

For this to be divisible by 6 either n+1 or n+ 2 is divisible by 3 that is n should not be divisible by 3

The number of numbers that is divisible by 3 is $\lfloor \frac{2024}{3} \rfloor  = 674$

So there are 664 numbers for which it is not divisible by 6 or there are 2024-674=-1350 numbers that are divisible by 6 

No comments: