1. The midpoinst of the small circles form a regular polylateral with the side-length 2r. You have n isosceles triangles.
2. The central angle of one of the isosceles triangles is $\displaystyle 2\alpha$, that means $\displaystyle 2\alpha$ must be a divisor of 360°.
3. Each isosceles triangle can be split into 2 right triangles with
$\displaystyle \sin(\alpha)=\frac{r}{R-r}~\implies~r=\frac{R \cdot \sin(\alpha)}{\sin(\alpha) + 1}$
4. Keep in mind that $\displaystyle n = \frac{360^\circ}{2 \alpha}$
An example: You know (from my previous post) that $\displaystyle n = \frac{360^\circ}{2 \alpha} = \frac{180^\circ}{\alpha}$
Now choose a value for $\displaystyle \alpha$ which must be a divisor of 180: $\displaystyle \tfrac14^\circ, \tfrac13^\circ, \tfrac12^\circ, 1^\circ, 2^\circ, 3^\circ, 4^\circ, 5^\circ, 6^\circ, 9^\circ ..... 90$
To each value of $\displaystyle \alpha$ belongs the number of small circles:$\displaystyle 720, 540, 360, 180, 90, 60, 45, 36, 30, 20, .... 2$
Of course you can choose the number of circles first and determine the value of $\displaystyle \alpha$ afterwards:
$\displaystyle \alpha = \frac{180^\circ}n~, n \in \mathbb{N}~\wedge~n\ge2$
For instance: You want to draw 7 small circles then $\displaystyle \alpha = \tfrac{180}7 ^\circ$
But in both cases you have to use the Sine function.