<s>[INST] 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:-

 [/INST] Let $a=A-X$, $b=A$, $c=A+X$, $d=A+2X$, with $A,X$ integers. Then $a^2+b^2+c^2=d$ becomes:
$3A^2+2X^2=A+2X$
$3A^2-A+2X^2-2X=0$
Multiply by 2:
$6A^2-2A+4X^2-4X=0$
$5A^2+(A-1)^2+(2X-1)^2=2$
Since $5A^2$ is divisible by $5$, we can only have $A=0$. Otherwise the sum of the squares exceeds $2$
Now $2X-1=\pm 1$ which gives $X=0$ or $X=2$
So we have either:
$a=b=c=d=0$, so $a+b+c+d=0$
or
$a=-1$, $b=0$, $c=1$, $d=2$, so $a+b+c+d=2$
</s>