I'm trying to determine the number of binary sequences containing exactly $a$ $1$'s and $b$ $0$'s if two sequences are considered identical if they can be reached from the each other by a series of circular shifts (moving the first bit to the end). For instance, for $a=b=4$, $10110010$ and $11001010$ would be considered the same.
At first, I assumed that there would simply be $\frac{(a+b-1)!}{a!b!}$ unique sequences because there are $\frac{(a+b)!}{a!b!}$ different sequences without circular shifts and each unique sequences with can reach $a+b$ different sequences with them; but some sequences, such as $10101010$ can become themselves after a series of circular shifts (in this case $2$, $4$, or $6$). Thus, there are actually more unique sequences. Thank you in advance for any assistance you can provide on this topic.
Edit: If the general solution is too difficult, I'm especially interested in situations where $a+b = p$ or $a = b = p$ for some prime $p$.
The total number of sequences (without circular shifting) with precisely $a$ $1$'s and $b$ $0$'s is $\tbinom{a+b}{a}=\tbinom{a+b}{b}$. If either $a=0$ or $b=0$ then there is of course only one such sequence.
For any sequence of length $a+b$, the number of cyclic shifts $d$ required to return the original sequence is a divisor of $a+b$. In particular, if $a+b=p$ is prime we must have $d=1$ or $d=p$. If $d=1$ for some sequence then either $a=0$ or $b=0$. Hence if $a\neq0$ and $b\neq0$ then every sequence has precisely $a+b=p$ distinct cyclic shifts, including itself. The number of distinct sequences is therefore precisely $$\frac{1}{a+b}\binom{a+b}{a}=\frac{1}{p}\cdot\binom{p}{a}=\frac{(p-1)!}{a!\cdot b!}.$$
If $a+b=2p$ then for any sequence the number of cyclic shifts $d$ required to return to the original sequence is either $1$, $2$, $p$ or $2p$. Again if it is $1$, then either $a=0$ or $b=0$, and then there is only one such sequence. So suppose $a\neq0$ and $b\neq0$ for now.
There is only one sequence returned to its original after $2$ cyclic shifts; this is $1010\ldots1010$ up to shifting. For this we must have $a=b=p$.
A sequence that returns to its original after $p$ cyclic shifts is a sequence of length $p=(a+b)/2$ repeated twice. For the prime case we have already counted $$\frac{1}{(a+b)/2}\binom{(a+b)/2}{a/2}=\frac{1}{p}\cdot\binom{p}{a/2}=\frac{(p-1)!}{(a/2)!\cdot(b/2)!},$$ such sequences, and its a nice exercise to check that distinct sequences of length $p$ yield distinct sequences of length $2p$ when repeating them twice. So number of such sequences is precisely $$\frac{(p-1)!}{(a/2)!\cdot(b/2)!}.$$ For this we must have both $a$ and $b$ even.
This allows us to count the number of distinct sequences if $a+b=2p$. If $a$ and $b$ are not both even, and $a\neq p$ and $b\neq p$, then ever sequence has precisely $a+b=2p$ distinct cyclic shifts, so just like in the prime case the number is $$\frac{1}{a+b}\binom{a+b}{a}=\frac{1}{2p}\cdot\binom{2p}{a}=\frac{(2p-1)!}{a!\cdot b!}.$$ If $a$ and $b$ are both even (and nonzero) but $a\neq p$ and $b\neq p$, then we count seperately the sequences that are returned after $p$ cyclic shifts, and those that are not. The number is then $$\frac{1}{a+b}\left(\binom{a+b}{a}-\binom{(a+b)/2}{a/2}\right)+\frac{1}{(a+b)/2}\binom{(a+b)/2}{a/2}=\frac{1}{2p}\left(\binom{2p}{a}+\binom{p}{a/2}\right).$$ If $a=b=p$ but $a$ and $b$ are not both even, then we count seperately the sequences that are returned after $2$ cyclic shifts, and those that are not. The number is then: $$\frac{1}{a+b}\left(\binom{a+b}{a}-2\right)+1=\frac{1}{2p}\left(\binom{2p}{p}-2\right)+1.$$ The only remaining case is $a=b=2$, which is easily counted by 'brute force'.
To generalise these results, if you are familiar with some group theory you could try applying Burnside's lemma. You may also want to look at the problem of counting necklaces, which is related.