Question 1
Let $S$ be the number of ordered pairs of integers $(a, b)$, with $1 \leqslant a \leqslant 100$ and $b \geqslant 0$, such that the polynomial $x^2 + ax + b$ can be factored into the product of two (not necessarily distinct) linear factors with integer coefficients. Find the remainder when $S$ is divided by $1000$.
Xem đáp án và lời giải
Đáp án: $600$
The factoring condition is equivalent to the discriminant $a^2 - 4b$ being equal to $c^2$ for some non-negative integer $c$. Because $b \geqslant 0$, the equation $4b = a^2 - c^2 = (a - c)(a + c)$ shows that $c \leqslant a$. Since $(a - c) + (a + c) = 2a$ is even, $a - c$ and $a + c$ have the same parity, which means $a \equiv c \pmod 2$. Thus, for each fixed integer $a$, the possible values of $c$ are non-negative integers $c \leqslant a$ such that $c \equiv a \pmod 2$. If $a$ is even, $c$ can be any even integer from $0$ to $a$, giving $\dfrac{a}{2} + 1$ values. If $a$ is odd, $c$ can be any odd integer from $1$ to $a$, giving $\dfrac{a+1}{2}$ values. Summing over all $1 \leqslant a \leqslant 100$: $$ \begin{aligned} S &= \sum_{k=1}^{50} (k + 1) + \sum_{k=1}^{50} k \\ &= 2 \sum_{k=1}^{50} k + 50 = 2 \times \dfrac{50 \times 51}{2} + 50 = 2550 + 50 = 2600. \end{aligned} $$ The remainder when $S$ is divided by $1000$ is $600$.