# For a ring of n tangent circles inscribed within the perimeter of a larger circle, calculate radius or diameter of circles or n

Update: K. Jiang solved for n, so I updated my question here below to now have all of the working formulas for easy reference to others.

Original Question: I have the following documented below correctly, but I'm having trouble solving for n because it's the denominator within sine. Can someone help me solve for n using $R = r ⋅[\sin(π ÷ n) + 1] ÷ \sin(π ÷ n)$?
Thanks

These Are All Working Formulas Now:

$n$ = the number of small circles
$r$ = the radius of the small circles
$R$ = the Radius of the large perimeter circle formed by the outer ring of small circles
$d$ = the diameter of the small circles
$D$ = the Diameter of the large perimeter circle formed by the outer ring of small circles

$$\boxed{r = R \frac{\sin(\frac{\pi}{n})}{\sin(\frac{\pi}{n}) + 1}}$$ $$\boxed{d = D \frac{\sin(\frac{\pi}{n})}{\sin(\frac{\pi}{n}) + 1}}$$

$$\boxed{R = r \frac{\sin(\frac{\pi}{n}) + 1}{\sin(\frac{\pi}{n})}}$$ $$\boxed{D = d \frac{\sin(\frac{\pi}{n}) + 1}{\sin(\frac{\pi}{n})}}$$

$$\boxed{n = \frac{\pi}{\arcsin(\frac{r}{R - r})}}$$ $$\boxed{n = \frac{\pi}{\arcsin(\frac{d}{D - d})}}$$ Note: the Radians function within Excel is not used for these formulas.

Consider the right triangle formed when we connect the center of the large circle, a center of a small circle, and one of the two closest intersection points between two small circles. We know that the central angle in the right triangle is $\frac{\pi}{n},$ as you have noted. The far side has length $r,$ and the hypotenuse has length $R - r.$ Thus, we have the relation $$\sin\left(\frac{\pi}{n}\right) = \frac{r}{R - r}$$ $$\frac{\pi}{n} = \sin^{-1}\left(\frac{r}{R - r}\right),$$ and we have the solution $$\boxed{n = \frac{\pi}{\sin^{-1}\left(\frac{r}{R - r}\right)}}.$$