I started studying on discrete mathematics and I came across the following "advanced question" in my textbook:
Let $a_n$ denote the number of circular words of length $2n + 1$ over the alphabet $A = \{0,1\}$ in which exactly $n$ zeroes occur. Alternatively, $a_n$ is the number of necklaces with exactly $n$ red beads and exactly $n + 1$ blue beads and no beads of other colours so that $a_n = \frac{1}{n+1} {2n\choose n}$ is the $n$-th Catalan number.
- Fix one of the circular words counted by $a_n$. Let $p$ be it's period and $w = w_1,\dots,w_{2n+1}$ be a representative. Explain why, for each $i,j$ such that $i -j \equiv p \pmod{2n + 1}$ we have $w_i = w_j$.
- Use the above to show that $n$ must be multiple of $\frac{2n+1}{p}$.
Any help would be grateful. Thanks in advance.
I summarize JBL's comments to provide an answer, so the question can be closed. Fix a circular word and let $w=(w_i)_{i=1,\dots,2n+1}$ be a representative. Let $x=(x_i)_{i=1,2,\dots}$ be the periodic sequence given by $x_i=w_i$ for $i\le 2n+1$ and $x_i=x_{i-(2n+1)}$ for $i>2n+1$, so $x$ is clearly periodic with period $2n+1$. Let $p$ be the fundamental period, that is the smallest number such that $x_i=x_{i-p}$ for all $i>p$. Then we have $p\le 2n+1$. Also, $p$ has to divide $2n+1$, otherwise for $2n+1=kp+r$ with $0<r<p$ we obtain that $x_i=x_{p-r+i}$ and thus $x$ is periodic with $r$, which contradicts the minimality of $p$. Let $I$ be the number of $1\le i\le p$ with $x_i=1$ and $O$ the number of $1\le i\le p$ with $x_i=0$. Then the number of ones in $w$ is $\frac{2n+1}{p}I$ and the number of zeros is $\frac{2n+1}{p}O$. Recalling the assumptions, this gives $\frac{2n+1}{p}I=n+1$ and $\frac{2n+1}{p}O=n$. Since $\frac{2n+1}{p}$ is an integer, and $n+1$, $n$ are coprime, we have $p=2n+1$. So, for every $i,j$ such that $i,j\equiv p\mod(2n+1)$ we have $i=j$ and hence $w_i=w_j$. The second part is trivial since $n$ is a multiple of $1$.
More details and the relation to the Catalan numbers can be found here.