Calculating the height of the $4$th sphere using Descartes' Theorem A friend of mine asked me the following question: Imagine three circles on a plane, each having radius $1$ and all touching each other. If two of the circles lie on a table, what is the height of the third circle from the table? He also asked me the three dimensional version, we image four spheres, each having radius $1$ and they all touch each other. If three of them lie on a table, what is the height of the fourth one from the table?
I am sure there are many clever, geometric ways to calculate these heights, but I am not that clever so I wanted to go with what I know. I know Descartes' theorem and I wanted to use it. Recall that the Descartes' theorem states that if there are $n+2$ $n$-spheres, all touching each other in the $n$-dimensional space, than the radii are subject to the formula $$
(\sum_{i=1}^{n+2} 1/r_i)^2 = n(\sum_{i=1}^{n+2}1/r_i^2).
$$ Or setting $x_i=1/r_i$ to be the curvatures of the spheres, we have $$
(\sum_{i=1}^{n+2} x_i)^2 = n(\sum_{i=1}^{n+2}x_i^2).
$$ I thought I can use this formula by exhausting the space between the three spheres  I can step-by-step calculate the radii of the smaller circles, then I can add them all up to find the answer.
Note that if the $n$-th circle has curvature $x_n=1/r_n$, then the $n+1$-th circle satisfies the formula $$
(1+1+x_{n}+x_{n+1})^2 = 2(1+1+x_n^2+x_{n+1}^2),
$$
so
$$
x_{n+1}^2-(2x_n+4)x_{n+1}+x_{n}^2-4x_n=0.
$$ Of course, $x_{n-1}$ is necessarily a solution of this equation (since $n-1$th, $n$th and the original two circles already touch each other), hence we obtain $$
x_{n+1} = 2 x_n+4-x_{n-1}.
$$ Using $x_1=1, x_2=3+2\sqrt{3}$, I found a closed formula for the sequence, and to the height $$
h = 1+\sum_{i=2}^{\infty} 2/x_i.
$$ Indeed, this gives me the correct number, that is, $\sqrt{3}$ (which, in hindsight, was actually easy to see). You might check WolframAlpha.
Now I wanted to use the same idea for $3$-dimensional case. Then, Descartes' Theorem gives $$
x_{n+1}-(x_n+3)x_{n+1}+x_n^2-3x_n=0,
$$ hence the relation is $$
x_{n+1} = x_n+3-x_{n-1}.
$$ Using $x_1 = 1, x_2 = 2+\sqrt{6}$, I get the sequence $1,2+\sqrt{6}, 4+\sqrt{6}, 5, 4-\sqrt{6}...$ However there is something wrong, this should have been an increasing sequence but $5<4+\sqrt{6}$ and also it becomes negative at some point.

What went wrong in dimension $3$?

Edit: It is also interesting to note that $1+2/(2+\sqrt{6})+2/(4+\sqrt{6})>\sqrt{3}$, so the height of the fourth sphere is more than $\sqrt{3}$. Of course, this is nonsense since in the $2$-dimensional case the answer is $\sqrt{3}$ and in the $3$-dimensional case the answer must be less than the $2$-dimensional case. But I don't understand what's wrong.
 A: Your results are correct.
It simply happens that spheres "go down through the hole", see figure below.

A: Your figure showing the three circles is also an overhead view of the lower three spheres in the pyramid of four spheres.
The circle labeled “$2$” represents the smallest sphere that can be inscribed between any four spheres that include the three lower unit spheres. Any smaller sphere will not be able to touch all three unit spheres simultaneously.
In short, there is a gap between the three spheres large enough to drop a sphere of curvature $3+2\sqrt3$ through it.
So initially the spheres in your series shrink, but their curvature can never exceed  $3+2\sqrt3$, and eventually you pass through the gap and the spheres start growing again.
The procedure that you were able to do with the circles, where the infinite series of circles measured the distance from the upper circle to the point of tangency of the lower circles, simply will not work in higher dimensions. The reason is that there is no common point of tangency between the lower spheres.
