TITLE: Intersection of rotating regular polygons
QUESTION [5 upvotes]: This question has a recreational flavor, but may not be
entirely uninteresting.
Let $P_k$ be a unit-radius regular polygon of $k$ sides,
and $P_n$ a unit-radius regular polygon of $n \ge k$ sides.
Both are origin-centered.
Fix $P_k$, and let $P_n$ rotate about its center by angle $\theta$.
Define $s(k,n)$ to be the sequence of the number of sides
of $P_k \cap P_n(\theta)$ as $\theta$ varies from $0$ to $2\pi$.
For example, I believe that $s(4,8)=(\overline{4,8})$,
with the overbar indicating repetition, while
$s(5,8)=(\overline{10,9})$.
Both are illustrated below.
(Reload the page to repeat the [limited] animations.)

          


          


It is an elementary puzzle to 

Q. Determine $s(k,n)$ precisely for all $n \ge k$.

I was interested in a higher-dimensional version of this question,
but already, although elementary, it seems to need some care to 
nail down $s(k,n)$ explicitly.

REPLY [7 votes]: There are two situations that can happen around a vertex of $P_k$, either the two nearest vertices of $P_n$ are going to crop off a small corner (thus adding one edge to the intersection $P_k\cap P_n$), or a vertex of $P_n$ coincides with the vertex of $P_k$. In the second situation, once two vertices coincide, $\gcd(n,k)$ of them will coincide. Therefore
$$s(k,n)=(\overline{2k,2k-\gcd(n,k)}).$$