25. A regular $m$-gon, a regular $n$-gon and a regular $p$-gon share a vertex and pairwise share edges, as shown in the diagram.
What is the largest possible value of $p$ ?
A 6
B 20
C 42
D 50
E 100
$p$-gon
Solution
C
The sum of the internal angles of a polygon with $m$ sides is $(m-2) 180^{\circ}$ [see Problem 25.1]. Hence each internal angle of the regular $m$-gon is $\left(\frac{m-2}{m}\right) 180^{\circ}$, and similarly for the regular $n$-gon and the regular $p$-gon. Therefore, because the sum of the angles at a point is $360^{\circ}$, we have $\left(\frac{m-2}{m}\right) 180+\left(\frac{n-2}{n}\right) 180+\left(\frac{p-2}{p}\right) 180=360$.
It follows that
$$
\begin{array}{l}
\frac{m-2}{m}+\frac{n-2}{n}+\frac{p-2}{p}=2 . \\
\frac{\left(\frac{m-2}{m}\right) 180^{\circ}}{\left(\frac{p-2}{p}\right)}\left(\frac{n-2}{n}\right) 180^{\circ} \\
\end{array}
$$

We may rewrite this last equation as $\left(1-\frac{2}{m}\right)+\left(1-\frac{2}{n}\right)+\left(1-\frac{2}{p}\right)=2$. Hence
$$
\frac{1}{m}+\frac{1}{n}+\frac{1}{p}=\frac{1}{2}
$$

We note that as $p$ is a positive integer, it follows from (1) that $\frac{1}{m}+\frac{1}{n}6$. When $m=3$ and $n=7$, we have $\frac{1}{m}+\frac{1}{n}=\frac{1}{3}+\frac{1}{7}=\frac{10}{21}$. Hence, by (1), $\frac{1}{p}=\frac{1}{2}-\frac{10}{21}=\frac{1}{42}$ and so $p=42$. We show that this gives the largest possible value of $p$.
We cannot have $m=n=4$, as this is not compatible with the inequality (2).
If $n>m \geq 4$, we have $\frac{1}{m}+\frac{1}{n} \leq \frac{1}{4}+\frac{1}{5}=\frac{9}{20}<\frac{10}{21}$ and so $\frac{1}{m}+\frac{1}{n}$ is not as large as possible.
Hence the largest possible value of $p$ is given by $m=3, n=7$ and $p=42$.
For inVESTIGATION
25.1 Prove that the sum of the angles of a polygon with $m$ sides is $(m-2) 180^{\circ}$ and hence that each internal angle of a regular $m$-gon is $\left(\frac{m-2}{m}\right) 180^{\circ}$.