Example 6. A football invitational tournament has 16 cities participating, each city sending Team A and Team B. According to the competition rules, each pair of teams plays at most one match, and the two teams from the same city do not play against each other. If, after two days of the tournament, it is found that except for Team A of City $A$, all other teams have played a different number of matches. How many matches has Team B of City $A$ played? Please prove your conclusion. (1985, National High School League)
Solve the problem with a general discussion. Suppose there are $n$ cities participating in the competition, all of which meet the conditions of the problem. Let the number of matches played by Team B of City $A$ be $a_{a}$, obviously $a_{1}=0$.

In the case of $n$ cities, according to the competition rules, each team can play at most $2(n-1)$ matches. By the conditions of the problem, the number of matches played by the $2n-1$ teams, excluding Team A of City $A$, should be $0,1,2, \cdots, 2(n-1)$. For definiteness, let Team A of City $B$ have played $2(n-1)$ matches, meaning it has completed all its matches. Thus, except for Team B of City $B$, all other teams have played at least one match. Therefore, the number of matches played by Team B of City $B$ is 0. Now, remove the two teams from City $B$ and consider the remaining $n-1$ cities. At this point, excluding Team A of City $A$, the number of matches played by each team is $1-1=0, 2-1=1, \cdots, (2n-3)-1=2(n-2)$ (each reduced by one match played against Team A of City $B$). Since in the case of $n-1$ cities, the number of matches played by Team B of City $A$ is $a_{n-1}$, it follows that $a_{n}=a_{n-1}+1, n \geqslant 2$. This shows that the sequence $\left\{a_{0}\right\}$ is an arithmetic sequence with the first term $a_{1}=0$ and common difference $d=1$, thus
$$
a_{n}=0+(n-1) \cdot 1=n-1.
$$

Substituting $n=16$ into the above formula, we get that Team B of City $A$ has played 15 matches.