Question
Question: Find the number of integers $n$ such that $1 \leq n \leq 100$ and $n^2 + 3n + 2$ is divisible by 5....
Find the number of integers n such that 1≤n≤100 and n2+3n+2 is divisible by 5.

40
Solution
The given expression is n2+3n+2.
First, we factorize the quadratic expression:
n2+3n+2=(n+1)(n+2)
For n2+3n+2 to be divisible by 5, the product (n+1)(n+2) must be divisible by 5.
Since 5 is a prime number, for a product of two integers to be divisible by 5, at least one of the integers must be divisible by 5.
So, either (n+1) is divisible by 5, or (n+2) is divisible by 5.
We can analyze this using modular arithmetic:
The expression (n+1)(n+2) must be congruent to 0(mod5).
Let's check the possible remainders of n when divided by 5:
- If n≡0(mod5):
(n+1)(n+2)≡(0+1)(0+2)≡1⋅2≡2(mod5). Not divisible by 5. - If n≡1(mod5):
(n+1)(n+2)≡(1+1)(1+2)≡2⋅3≡6≡1(mod5). Not divisible by 5. - If n≡2(mod5):
(n+1)(n+2)≡(2+1)(2+2)≡3⋅4≡12≡2(mod5). Not divisible by 5. - If n≡3(mod5):
(n+1)(n+2)≡(3+1)(3+2)≡4⋅5≡4⋅0≡0(mod5). Divisible by 5. - If n≡4(mod5):
(n+1)(n+2)≡(4+1)(4+2)≡5⋅6≡0⋅1≡0(mod5). Divisible by 5.
Thus, n2+3n+2 is divisible by 5 if and only if n≡3(mod5) or n≡4(mod5).
These two conditions are mutually exclusive, as an integer cannot leave both a remainder of 3 and a remainder of 4 when divided by 5.
Now we need to count the number of integers n such that 1≤n≤100 and n satisfies one of these conditions.
Case 1: n≡3(mod5)
These integers are of the form 5k+3.
For 1≤n≤100:
1≤5k+3≤100
Subtract 3 from all parts:
1−3≤5k≤100−3
−2≤5k≤97
Divide by 5:
−52≤k≤597
−0.4≤k≤19.4
Since k must be an integer, k can take values from 0,1,2,…,19.
The number of such values of k is 19−0+1=20.
Case 2: n≡4(mod5)
These integers are of the form 5k+4.
For 1≤n≤100:
1≤5k+4≤100
Subtract 4 from all parts:
1−4≤5k≤100−4
−3≤5k≤96
Divide by 5:
−53≤k≤596
−0.6≤k≤19.2
Since k must be an integer, k can take values from 0,1,2,…,19.
The number of such values of k is 19−0+1=20.
Since the two cases are mutually exclusive, the total number of integers n is the sum of the counts from Case 1 and Case 2.
Total number of integers = 20+20=40.
Alternatively, we can observe that in any block of 5 consecutive integers (e.g., 1,2,3,4,5 or 6,7,8,9,10), there will be exactly one integer n such that n≡3(mod5) and exactly one integer n such that n≡4(mod5).
The range 1≤n≤100 contains 100 integers.
Since 100=20×5, there are 20 such blocks of 5 integers.
Each block contributes 2 integers for which n2+3n+2 is divisible by 5.
So, the total number of integers is 20×2=40.
The final answer is 40.