<s>[INST] Find positive integers $a$ which there exists an integer $b, 0 \leq b \leq 2002$, such both quadratics $x^2+ax+b$ and $x^2+ax+b+1$ have integer roots. Compute the number of positive integers $a$ for which there exists an integer $b, 0 \leq b \leq 2002$, such that both of the quadratics $x^2+ax+b$ and $x^2+ax+b+1$ have integer roots.
First the conditions that satisfy integer roots: discriminant being $\geq 0$
$a^2-4b \geq 0$ and $a^2-4(b+1) \geq 0$
$a^2 \geq 4b$ and $a^2\geq 4(b+1)$
$a^2 \geq 4b$ and $a^2\geq 4(b+1)$
In order to satisfy both quadratics we consider $a^2\geq 4(b+1)$ only
$\therefore 0 \leq a\leq 2\sqrt{b+1}$
If $b=0$
$0 \leq a\leq 2$
If $b=2002$
$0 \leq a\leq 2\sqrt{2002+1}$
$\therefore 2\leq a \leq 2\sqrt{2002+1} \approx89.5$ 3sf
$(89.5-2)+1=88.5=88$
$\therefore$ the number of positive integers $a:88$
No idea if it's correct or not can anyone please chime in, greatly appreciated.
 [/INST] For them to be integers both $a^2-4b$ and $a^2-4(b+1)$ have to be perfect squares. Let them be $k^2$ and $l^2$ respectively. Then $k^2-4=l^2 \implies k^2-l^2=4 \implies (k-l)(k+l)=4$
Since $a$ and $b$ both are integers, then $k$ and $l$ are also trivially integers. These two integers multiply to give $4$. hence they must be factors of $4$. Match them with all the possible factor pairs of $4$ and you will get your $k$ and $l$ values. Since there are only squares of $k$ and $l$ here, we do not need to worry about the negative values of $k$ and $l$. After doing all that you will get that $k=2$ and $l=0$ is the only solution. $a^2-4b=4 \implies a^2= 4(b+1)$. Using the bounds given, find the values of $a$. I leave the rest to you.
You can just count the number of cases yourself. Just remove all the odd squares from $1$ to $89$ and you got your answer. (The answer is $44$ values and they are $a^2=4k^2$ where $k$ is an integer from $1$ to $44$).
</s>