An alphabet consists of $n$ letters. What is the maximal length of a word if we know that any two consecutive letters $a,b$ of the word are different and that the word cannot be reduced to a word of the kind $abab$ with $a\neq b$ by removing letters.
1. **Base Case:**
   For \( n = 2 \), consider the alphabet \(\{a, b\}\). The word "aba" has length 3, and it cannot be reduced to a word of the form \(abab\) by removing letters. Thus, the maximal length for \( n = 2 \) is \( 2 \cdot 2 - 1 = 3 \).

2. **Induction Hypothesis:**
   Assume that for an alphabet of \( k \) letters, the maximal length of a word satisfying the given conditions is \( 2k - 1 \).

3. **Induction Step:**
   We need to show that for \( n = k + 1 \), the maximal length of a word is \( 2(k + 1) - 1 = 2k + 1 \).

   - Assume that each letter in the word appears at least 3 times. Then, we can extract a subword using only the first \( n-1 \) letters (i.e., \( k \) letters) that satisfies the condition. This subword would have a length of at least \( 3(k) \), which is greater than \( 2k + 1 \) because \( k > 2 \). This contradicts the induction hypothesis that the maximal length for \( k \) letters is \( 2k - 1 \).

   - Therefore, there must be a letter \( a \) that appears at most twice. If we disregard \( a \) from our word, we are left with a word using only \( k \) letters that satisfies the condition. By the induction hypothesis, this word has a length of at most \( 2k - 1 \).

   - Adding back the letter \( a \) (which appears at most twice), the total length of the word is at most \( 2k - 1 + 2 = 2k + 1 \).

4. **Constructive Example:**
   To show that the length \( 2n - 1 \) is attainable, consider the word \( a_1, a_2, \ldots, a_n, a_{n-1}, \ldots, a_1 \). This word has length \( 2n - 1 \) and satisfies the condition that no two consecutive letters are the same and it cannot be reduced to a word of the form \( abab \) by removing letters.

Conclusion:
By induction, we have shown that the maximal length of a word for an alphabet of \( n \) letters, where no two consecutive letters are the same and the word cannot be reduced to a word of the form \( abab \) by removing letters, is \( 2n - 1 \).

The final answer is \( \boxed{ 2n - 1 } \).