Four distinct integers a,b,c,d are in A.P. If $a^2+b^2+c^2=d$, then find$ a+b+c+d$. Four distinct integers a,b,c,d are in arithmetic progression. If $a^2+b^2+c^2=d$, then find $a+b+c+d$.
My attempt:-


As you did, let $a=A-x,b=A$. 
Then, we have
$$2x^2\color{red}{-}2x+3A^2-A=0,$$
i.e.
$$x=\frac{1\pm\sqrt{-6A^2+2A+1}}{2}$$
Since $x$ has to be an integer, let $-6A^2+2A+1=m^2$ to have 
$$6m^2+\left(6A-1\right)^2=7$$
So, $7-6m^2\ge 0\implies m=0,\pm 1$ giving $(m,A)=(\pm 1,0)$. 
Since $a,b,c,d$ are distinct,
$$a+b+c+d=4A+2x=0+2=\color{red}{2}$$
where $(a,b,c,d)=(-1,0,1,2)$.
