4. Determine all values of the real parameter $a$ for which the equation

$$
x^{3}-3 a x^{2}+\left(2 a^{2}+5\right) x-2 a^{2}+3=0
$$

has 3 real solutions that form an arithmetic progression.
4. Let $x_{1}, x_{2}$, and $x_{3}$ be the solutions of the given equation, with $x_{1} \leqslant x_{2} \leqslant x_{3}$. From Vieta's formulas, we have $x_{1}+x_{2}+x_{3}=3 a$, $x_{1} x_{2}+x_{1} x_{3}+x_{2} x_{3}=2 a^{2}+5$, and $x_{1} x_{2} x_{3}=2 a^{2}-3$. Since the solutions must form an arithmetic progression, we can write $x_{1}=x_{2}-d$ and $x_{3}=x_{2}+d$ for some real number $d, d \geqslant 0$. Then the previous three formulas reduce to

$$
3 x_{2}=3 a, \quad 3 x_{2}^{2}-d^{2}=2 a^{2}+5 \quad \text { and } \quad x_{2}^{3}-x_{2} d^{2}=2 a^{2}-3
$$

From the first of these, we immediately get $x_{2}=a$. The other two then reduce to

$$
d^{2}=3 x_{2}^{2}-2 a^{2}-5=3 a^{2}-2 a^{2}-5=a^{2}-5 \quad \text { and } \quad d^{2}=\frac{x_{2}^{3}-2 a^{2}+3}{x_{2}}=\frac{a^{3}-2 a^{2}+3}{a}
$$

Further, substituting $x_{2}=a$ into the equation from the problem statement, we get

$$
0=a^{3}-3 a^{3}+\left(2 a^{2}+5\right) a-2 a^{2}+3=5 a-2 a^{2}+3
$$

from which it follows that $a=\frac{-5 \pm \sqrt{25+24}}{-4}=\frac{-5 \pm 7}{-4}$, i.e., $a=-\frac{1}{2}$ or $a=3$. In the case $a=-\frac{1}{2}$, it would follow that $d^{2}=\left(-\frac{1}{2}\right)^{2}-5=-\frac{19}{4}<0$, so the given equation would not have all real solutions. In the case $a=3$, we have $d^{2}=3^{2}-5=4$ (and $d^{2}=\frac{3^{3}-2 \cdot 3^{2}+3}{3}=4$, which is the same), i.e., $d=2$; the given equation then becomes $x^{3}-9 x^{2}+23 x-15=0$, and its solutions are $x_{1}=x_{2}-d=3-2=1$, $x_{2}=3$, and $x_{3}=x_{2}+d=3+2=5$.

Thus, the only such value of the parameter $a$ is $a=3$.