By symmetry, always (the two uneven profiles have the same count). Let (flush profile count) and (uneven profile count). Then and . You can combine these into a single recurrence for : .
This lets you compute the answer in time with a simple loop. The broken profile perspective reveals why this recurrence works. Without it, deriving the formula by hand is tricky.