Generating function for a necklace with white and black beads such that for every white bead there are exactly three black beads that follow. The question asks to find the generating function for the class of all necklaces such that each white bead has exactly three black beads following it in the clockwise direction. I know that the generating function for a cycle is $\frac{\phi(k)}{k}\text{log}\big(\frac{1}{1-A(k)}\big)$. The problem is figuring out how to find the $A(k)$. I can't find any resources that talk about strings containing such a pattern.
As an aside, how would one do this for at least three black beads and at most three black beads as well?
 A: I believe me and some friends solved it. For exactly three beads, we have two options -- either all of the necklace is composed of white and black beads, or it is composed of just black beads (consider that if we have the condition of both white and black beads and black beads, we get the case that there are more than three black beads following a white bead). For the case that it is composed of just black beads, we have $\text{Cyc}(z)$, and for the case that it is composed of all white and black beads, we note that the size of this is 4 (since we have white-black-black-black) and so we have $\text{Cyc}(z^4)$. Since it's either of these values, we take the union to get $\text{Cyc}(z) \cup \text{Cyc}(z^4)$. As a fun aside, note this is equivalent to $\text{Seq}_{\geq 1}(z) \cup \text{Seq}_{\geq 1}(z^4)$, since we have only atoms here. It follows that the OGF is $\frac{z}{1-z} + \frac{z}{1-z^4}$.
For the case of at least three black beads, we have two atoms to consider. One is the atom of white-black-black-black and the other is just black. Therefore, since it is composed of either of these, we can take the class $\text{Cyc}(z + z^4) = \sum_{k=1}^{\infty}\frac{\phi(k)}{k}\text{log}\big(\frac{1}{1-z-z^4}\big)$. 
Finally, for at most three black beads, we have foru cases to consider - black, white, white-black, white-black-black, white-black-black-black. Note that the element black cannot be grouped with the elements with white, since this would add the condition of more than three blacks. Therefore, we have $\text{Cyc}(z)$ for the case of just black, and $\text{Cyc}(z + z^2 + z^3 + z^4)$. Since it's either of these cases, we have $\text{Cyc}(z) \cup \text{Cyc}(z+z^2+z^3+z^4)$. The OGF is then $\frac{z}{1-z} + \sum_{k \geq 1}\frac{\phi(k)}{k}\text{log}\big(\frac{1}{1-z-z^2-z^3-z^4}\big)$.
