How many arrangements of the letters AABBCCDDEE are there such that there are no double letters in the sequence?
Searching the OEIS with the answer 39480 quickly finds A114938 "Number of permutations of the multiset {1,1,2,2,....,n,n} with no two consecutive terms equal." This problem asks to compute a(5).
The OEIS provides several formulas including a recursive formula:
a(n) = n*(2*n-1)*a(n-1) + (n-1)*n*a(n-2)
a(1) = 0, trivially. a(2) = 2, for ABAB and BABA. Then a(5) is pretty easy to calculate by hand by stepping through the sequence: 0, 2, 30, 864, 39480, ....