Counting & ProbabilityHardRecursion, Catalan Numbers & Generating Functions
Recursion, Catalan Numbers & Generating Functions · Hard problem
How many strings of length over the alphabet have no two adjacent characters equal and also have first character different from last?