Input
A single positive integer \$ 10 \geq n \geq 2\$
Output
A list of strings, each of length \$2n\$, satisfying the following properties.
- Each string will contain each of the first \$n\$ lowercase letters of the alphabet exactly twice.
- No letter can occur twice consecutively. That is
abbcac
is not allowed. - No two strings that are
equivalent
can be in the list. Equivalence will be defined below. - All non-equivalent strings satisfying the rules must be in the list.
Equivalence
We say that two strings of the same length are equivalent if there is a bijection from the letters in the first string to the letters in the second string which makes them equal. For example, abcbca
and bcacab
are equivalent.
Examples
- \$n = 2\$:
abab
- \$n = 3\$:
abacbc abcabc abcacb abcbac abcbca
The length of these lists is A278990.
ABAB
)? \$\endgroup\$