4A. Find all real numbers $a$ and $b, b>0$, such that the roots of the given equations $x^{2}+a x+a=b$ and $x^{2}+a x+a=-b$ are four consecutive integers.
Solution. Let $x_{1}, x_{2}$ and $x_{3}, x_{4}$ be the roots of the first and second equations, respectively. Then, from Vieta's formulas, we have that the sum of the roots is equal to $-2a$, and since they are four consecutive integers, we have

$$
\begin{aligned}
& x+x+1+x+2+x+3=-2 a \\
& 4 x+6=-2 a \\
& x=-\frac{a+3}{2}
\end{aligned}
$$

so the four roots of the given equations are $-\frac{a+3}{2},-\frac{a+1}{2},-\frac{a-1}{2}$, and $-\frac{a-3}{2}$. We have $x_{1,2}=-\frac{a \pm 3}{2}$ and $x_{3,4}=-\frac{a \pm 1}{2}$, or vice versa. We use Vieta's formulas again and get:

$$
\begin{aligned}
& x_{1} x_{2}+x_{3} x_{4}=(a-b)+(a+b) \\
& \left(-\frac{a+3}{2}\right)\left(-\frac{a-3}{2}\right)+\left(-\frac{a+1}{2}\right)\left(-\frac{a-1}{2}\right)=2 a \\
& a^{2}-4 a-5=0
\end{aligned}
$$

i.e., $a=-1$ or $a=5$.

For $a=-1$ the roots are $-1,0,1,2$ and $b=1$. For $a=5$ the roots are $-4,-3,-2,-1$ and $b=1$. Therefore, the required numbers are $a=-1$ and $b=1$ or $a=5$ and $b=5$.