<s>[INST] If distinct integers $a,b,c,d$ are consecutive terms of an arithmetic progression such that . . . 
If distinct integers $a,b,c,d$ are consecutive terms of an arithmetic progression such that
  $$a^2 + b^2 + c^2=d$$
  then $a+b+c+d$ equals?
  $$(A)\ 0 \quad (B)\ 1 \quad (C)\ 2 \quad (D)\ 4$$
  Here is what I tried: assume the common difference is $x$.
  Thus,
  $$a^2 + a^2 + 2ax + x^2 +a^2 +4ax +4x^2=a + 3x$$
  That is,
  $$3a^2 + 6ax + 2x^2=a + 3x$$
  First I assumed it as a quadratic in $a$ and solved for it.
  $$a=\frac{(1-6x) \pm \sqrt{12x^2-48x +1}}{6}$$ but to no avail.
  Then I assumed it as a quadratic in $x$ and got:
  $$x=\frac{(3-6a) \pm \sqrt{12a^2 -36a +81}}{6}$$
  And I noticed that I'm stuck. Please help. Thanks in advance!

Edit: I made a calculation error as pointed out by multiple answers, and so the equation should have been $$3a^2 + 6ax + 5x^2=a + 3x$$ which leads to different solutions.
 [/INST] You made a slight error, this needs to be $5x^2$ and not $2x^2$.
So you have this equation $$3a^2+a(6x-1)+(5x^2-3x)=0$$
This equation has discriminant $\Delta=-24x^2+24x+1$
The way to solve this for Diophantine equations is to introduce an integer $m$ such that $\Delta=m^2$ (because we need the square root to be an integer for the solution $a$ to have a chance to be an integer).
Now we are left to solve $$24x^2-24x+(m^2-1)=0$$
Once again since $x$ is an integer, the discriminant $\delta=672-96m^2=96(7-m^2)$ should also be a perfect square.
In this case notice that $m$ can only take values $\ 0,1,2\ $ since we need $\delta\ge 0$
$96=2^5\times 3$ so we need to multiply by $6$ to have perfect square and the solution is $m=1$.
Finally $x=\dfrac{24\pm\sqrt{96\times 6}}{2\times 24}\in\{0,1\}$
The last step is to verify the $x$ found satisfy the original problem.


*

*$x=0$
Then $a=b=c=d\implies d=3a^2=a\implies a=\frac 13$ which is not an integer. So this is not a valid solution.


*

*$x=1$
With this value we arrive to $$3a^2+5a+2=(a+1)(3a+2)=0$$
And only $a=-1$ is a valid integer.

Conclusion: $a=-1,\ b=0,\ c=1,\ d=2$

We can verify $a^2+b^2+c^2=1+0+1=2=d$ and $a+b+c+d=-1+0+1+2=2$.
</s>