Three circles of radius $a$ are drawn on the surface of a sphere of radius $r$. Each pair of circles touches externally and the three circles all lie in one hemisphere. Find the radius of a circle on the surface of the sphere which touches all three circles.
1. **Identify the poles of the circles:**
   Let \( O_1, O_2, O_3 \) be the poles of the three circles on the surface of the sphere. Each pair of circles touches externally, so the distance between each pair of poles is \( a \).

2. **Form a tetrahedron:**
   Consider the tetrahedron formed by the points \( O_1, O_2, O_3 \), and the center of the sphere \( O \). The distance between each pair of points \( O_1, O_2, O_3 \) is \( a \).

3. **Calculate the centroid of the triangle \( O_1O_2O_3 \):**
   The centroid \( T \) of the equilateral triangle \( O_1O_2O_3 \) is at a distance of \( \frac{a\sqrt{3}}{3} \) from each of the points \( O_1, O_2, O_3 \).

4. **Determine the angle \( \angle O_1OT \):**
   The angle \( \angle O_1OT \) can be found using the sine function:
   \[
   \sin(\angle O_1OT) = \frac{\text{opposite}}{\text{hypotenuse}} = \frac{\frac{a\sqrt{3}}{3}}{r}
   \]
   Therefore,
   \[
   \angle O_1OT = \arcsin\left(\frac{a\sqrt{3}}{3r}\right)
   \]

5. **Determine the angle \( \angle O_1OK \):**
   Let \( K \) be the tangency point of the circle \( C(O_1) \) and the desired circle. The angle \( \angle O_1OK \) is given by:
   \[
   \sin(\angle O_1OK) = \frac{a}{r}
   \]
   Therefore,
   \[
   \angle O_1OK = \arcsin\left(\frac{a}{r}\right)
   \]

6. **Calculate the angle \( \angle KOT \):**
   The angle \( \angle KOT \) is the difference between \( \angle O_1OK \) and \( \angle O_1OT \):
   \[
   \angle KOT = \arcsin\left(\frac{a}{r}\right) - \arcsin\left(\frac{a\sqrt{3}}{3r}\right)
   \]

7. **Determine the radius of the desired circle:**
   The radius \( R \) of the desired circle can be found using the relationship between the angle \( \angle KOT \) and the radius of the sphere:
   \[
   R = r \sin(\angle KOT)
   \]
   Substituting the value of \( \angle KOT \):
   \[
   R = r \sin\left(\arcsin\left(\frac{a}{r}\right) - \arcsin\left(\frac{a\sqrt{3}}{3r}\right)\right)
   \]

The final answer is \( \boxed{ R = r \sin\left(\arcsin\left(\frac{a}{r}\right) - \arcsin\left(\frac{a\sqrt{3}}{3r}\right)\right) } \).