I am doing some work on gauss codes in higher genus surfaces (good resource on the planar case here if you are unfamiliar) and am trying to figure out how many distinct gauss codes there are for a given number of distinct letters. Gauss codes are a sequence of letters where each letter occurs exactly twice. Two codes are equivalent if you can get from one to the other using any combination of the following moves:
- Cyclic permutation ie moving the last letter to the front. For instance, abcabc is the same as cabcab
- Reversal ie reading the code backwards. For instance abcabc is the same as cbacba
- Exchanging letters ie replacing all the instance of one symbol with another and vice versa. For instance abcdeabcde is the same as adcbeadcbe by switching b and d
These three moves seem to reduce it down to very few codes. There is obviously 1 option for 1 pair symbols (aa) and 2 for 2 pairs (abab and aabb). Less obviously, but still fairly clearly, there are 5 for 3 pairs (aabbcc, ababcc, abacbc, abbacc, abcabc). Beyond this I am not clear.
Some perhaps useful invariants I have noticed is that 'double letters (...aa...) cannot be changed by these moves except for putting 1 at the start and 1 at the end. Additionally, if you count the gaps between letters and their partners, that sequence doesn't change except for negating it mod 2n ie in 3 pairs, a gap of 4 is equivalent to a gap of 2 (in the other direction). There are a few others, but I am curious if there is a combinatorial way to reduce the permutations of these symbols (2n!/2^n) down to the set of equivalence classes under these rules.
Thank you!
It looks like it is this sequence:
A054499: Number of pairings on a bracelet; number of chord diagrams that can be turned over and having n chords.
Copied from the OEIS sequence page:
and the formula is derived from 2 other sequences: