Find the largest integer that satisfies this system $a,b,c,d$ are real numbers. Find the largest integer value of $d$ such that
$$a+b+c=d$$
$$a^2+b^2+c^2=d+1$$
The two equations seem to be of a plane and a sphere. But how do I proceed from here? Thanks.
 A: The following may be useful. By the Cauchy-Schwarz Inequality, we have $(a+b+c)^2 \le (a^2+b^2+c^2)(3)$. In the notation of the linked article, we use $y_i=1$ for $i=1,2,3$. 
Thus if $a+b+c=d$ and $a^2+b^2+c^2=d+1$, we have $d^2 \le 3(d+1)$. If $d$ is to be an integer, this forces $d\le 3$. 
A: The original equations have a solution if the plane $z=d-x-y$ and the sphere $x^2+y^2+z^2=d+1$ intersect.
For $d>0$, the point on $z=d-x-y$ closest to the origin is $({d\over 3},{d\over 3}, {d\over 3})$, which is ${d\over\sqrt3}$ units from the origin. If ${d\over\sqrt3}$ equals the radius of the sphere, $\sqrt{d+1}$, the plane and sphere are tangent at $({d\over 3},{d\over 3}, {d\over 3})$. This happens if $d={1\over2}(3+\sqrt{21})$, which isn't an integer.
But for any value of $d$ with absolute value smaller than ${1\over2}(3+\sqrt{21})$, the plane and sphere will intersect in a circle, and there will be real numbers $a$, $b$, and $c$ for which $a+b+c=d$ and $a^2+b^2+c^2=d+1$. The largest integer $d<{1\over2}(3+\sqrt{21})$ is $\lfloor{1\over2}(3+\sqrt{21})\rfloor$, which is 3.
