Three spheres of radius $r$ touch each other and a sphere of radius $R$ externally. Under what ratio between $r$ and $R$ is this possible? Assuming $R>r$, find the radius of the sphere that touches all four spheres externally.
Let $A, B$ and $C$ be the centers of spheres with radius $r$, and $D$ be the center of a sphere with radius $R$. Since the line connecting the centers of two tangent spheres passes through their point of tangency, the edges of the pyramid $A B C D$ are $D A=D B=D C=r+R$, $A B=B C=A C=2 r$, which means $A B C D$ is a regular pyramid with vertex $D$. Let $O$ be the center of a sphere with radius $x$ that is tangent to the four given spheres. Then $O A=O B=O C=r+x$ and $O D=R+x$. The point $O$ is equidistant from the vertices of the equilateral triangle $A B C$, so it lies on the line $D P$, where $P$ is the center of the equilateral triangle $A B C$. For the sphere with radius $R$ to be tangent to the three spheres with radius $r$, the condition $A D>A P$ must be satisfied, i.e., $r+R \geqslant \frac{2 r \sqrt{3}}{3}$, from which $\left.R \geqslant \frac{2}{\sqrt{3}}-1\right) r$. Let $\angle A D P=\angle B D P=\angle C D P=\alpha$. From the right triangle $A D P$, we find that

$$
\sin \alpha=\frac{A P^{\prime}}{A D}=\frac{\frac{2 r \sqrt{3}}{3}}{r+R}
$$

## Then

$$
\cos \alpha=\sqrt{1-\sin ^{2} \alpha}=\sqrt{1-\left(\frac{\frac{2 \sqrt{3}}{r+R}}{r+R}\right)^{2}}=\frac{\sqrt{R^{2}+2 R r-\frac{r^{2}}{3}}}{r+R R}
$$

From the triangle $A D O$ using the cosine rule, we find that

$$
A O 2=A D 2+D O 2-2 A D \cdot D O \cos \alpha
$$

or

$$
(x+r) 2=(r+R) 2+(x+R) 2-2(r+R)(x+R) \cdot \frac{\sqrt{R^{2}+2 R r-\frac{r^{2}}{3}}}{r+R},
$$

from which

$$
x=\frac{R\left(R+\varphi-\sqrt{\left.R^{2}+2 R r-\frac{r^{2}}{3}\right)}\right.}{r+\sqrt{R^{2}+2 R r \varphi-\frac{r^{2}}{3}}-R R}
$$

The expression under the square root is non-negative, since from the inequality $r+R \geqslant \frac{2 r \sqrt{3}}{3}$ follows the inequality $R 2+2 R r-\frac{r^{2}}{3} \geqslant 0$.

## Answer

$R \geqslant\left(\frac{2}{\sqrt{3}}-1\right) r ; \frac{R\left(R+\varphi-\sqrt{R^{2}+2 R r-\frac{r^{2}}{3}}\right)}{\varphi+\sqrt{R^{2}+2 R r-\frac{r^{2}}{3}}-R}$.

Note: The symbol $\varphi$ in the final formula might be a typo or a placeholder for a specific value or variable that was not defined in the original text.