A right, quadrilateral pyramid is constructed around a sphere with radius $r$. What is the volume of this pyramid if the center of the sphere divides the height of the pyramid in the ratio $p: q$?
The distance from the center of the sphere to the apex of the pyramid is $x$, so:

$$
r: x=p: q
$$

from which

$$
x=\frac{r q}{p}
$$

and thus the height of the pyramid

$$
m=r+x=r \frac{p+q}{p}
$$

If the sphere touches one of the pyramid's side faces at a distance $y$ from the apex, then

$$
y^{2}=x^{2}-r^{2}=\frac{r^{2} q^{2}}{p^{2}}-r^{2}=\frac{r^{2}}{p^{2}}\left(q^{2}-p^{2}\right)
$$

On the other hand,

$$
y: r=m: a
$$

where $a$ is half the base edge of the pyramid; thus:

$$
a^{2}=\frac{m^{2} r^{2}}{y^{2}}=\frac{r^{4} q^{2}(p+q)^{2}}{p^{2}} \cdot \frac{p^{2}}{r^{2}\left(q^{2}-p^{2}\right)}
$$

or

$$
a^{2}=\frac{r^{2}(p+q)^{2}}{q^{2}-p^{2}}=\frac{r^{2}(p+q)}{q-p}
$$

and thus the volume of the pyramid

$$
K=\frac{4 a^{2} m}{3}=\frac{4}{3} \frac{r^{3}(q+p)^{2}}{p(q-p)}
$$

Number of solutions: 41.