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.
 A: Hint:
Let $a,b,c,d$ be $A-3D, A-D, A+D, A+3D$
$$A+3D=(A-3D)^2+(A-D)^2+(A+D)^2=3A^2+11D^2-6AD$$
$$3A^2-A(6D+1)+11D^2-3D=0$$
The discriminant $$(6D+1)^2-12(11D^2-3D)=-96D^2+48D+1=1+6-96\left(D-\dfrac14\right)^2\le7$$ has to be perfect square
A: Your correct equation is $$3a^2+a(6x-1)+5x^2-3x=0$$ whose discriminant is $$(6x-1)^2-12(5x^2-3x)=1+6-24\left(x-\dfrac12\right)^2\le7$$
or the equation can be formed as $$5x^2+x(6a-3)+3a^2-a=0$$
Calculate the discriminant which needs to be perfect square 
A: Let $x$ be the common difference.

From $a^2+b^2+c^2=d$, we get $d > 0$,

Since $a,b,c,d$ are distinct, we get $x\ne 0$.

If $x < 0$, then $c > d$, hence 
$$c^2 > d^2\ge d=a^2+b^2+c^2 > c^2$$
contradiction.

Hence $x > 0$.

\begin{align*}
\text{Then}\;\;&a^2+b^2+c^2=d\\[4pt]
\implies\;&(b-x)^2+b^2+(b+x)^2=b+2x\\[4pt]
\implies\;&3b^2+2x^2=b+2x\\[4pt]
\implies\;&b(1-3b)=2x(x-1)\\[4pt]
\implies\;&b(1-3b)\ge 0\\[4pt]
\implies\;&b=0\;\;\\[4pt]
\implies\;&2x(x-1)=0\\[4pt]
\implies\;&x=1\\[4pt]
\implies\;&a,b,c,d=-1,0,1,2\\[4pt]
\implies\;&a+b+c+d=2\\[4pt]
\end{align*}
A: 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$.
