The probability that a set of three distinct vertices chosen at random from among the vertices of a regular $n$-gon determine an obtuse triangle is $\frac{45}{61}$. Find the sum of all possible values of $n$.
For odd $n=2k+1$ the probability of an obtuse triangle is $\frac{3(k-1)}{2(2k-1)}$, and for even $n=2k$ it is $\frac{3(k-2)}{2(2k-1)}$ (right triangles excluded).
Setting these equal to $\frac{45}{61}$: odd gives $k=31$, $n=63$; even gives $k=92$, $n=184$.