I'm trying to understand the OEIS sequence A059078:
Number of orientable necklaces with 2n beads and two colors which when turned over produce their own color complement.
0, 0, 0, 1, 2, 6, 12, 27, 54, ...
I'm able to recreate the exact number of such necklaces for $n=3$, $n=4$, and $n=5$, but when $n=6$, I obtain 13 such necklaces when there should only be 12 (listed below).
000001011111
000010101111
000011001111
000100110111
000101010111
000101011101
000101110011
000110100111
001001011011
001010101011
001010101101
001010110011
001011001011
Which one of these doesn't satisfy the criteria?
I consider two strings $s_1$ and $s_2$ equivalent if $min(L(s_1), L(s_1^*)) = min(L(s_2), L(s_2^*))$, where $L(s)$ is the Lyndon word of string $s$ and $s*$ is the turned over version of $s$, obtained by reversal. Also, I believe "orientable necklace" is the same as a chiral bracelet.
The problem originates in this formula (from OEIS):
$a(n) = $A059076$(2n) - 2\times$A059053$(2n)$
A059076 is the number of pairs of orientable necklaces and A059053 is the number of chiral pairs of necklaces with $n$ beads and two colors (color complements being equivalent).
Actually, the description of A059053 is misleading, since these are not necessarily pairs, but classes of equivalence, where two orientable necklaces are in the same class of equivalence if we can deduce the other by turning over and/or complementing. Most of these equivalence classes are made of two orientable necklaces, except if one is the color complement of the other (and then, the orientable necklace is alone in its class). (Actually, it is not exactly clear what chiral means in this context, so maybe necklaces that are self-similar by complementation should not be counted in this sequence, but then A059053 is wrong).
Now the error in the formula is quite clear: We should not substract twice the equivalence classes with only one necklace.
For $12$ beads, the only such necklace is
000100111011, explaining the off-by-one error.A059078 goes like this : 13, 28, 58, 120, 246, 496, 1005... (Can't go much further because I coded a very simple but painfully slow algorithm to make sure results were correct)
Here are the 28 necklaces for $n=7$: