Solution (source code)

= Solution

At the stability boundary $r_*=1$, the characteristic roots are
$$
\lambda=\frac{1\pm i\sqrt3}{2}=e^{\pm i\pi/3}.
$$
They lie on the unit circle and satisfy $\lambda^6=1$, with no smaller positive common period. Hence
$$
\boxed{r_*=1,\qquad p=6}.
$$