In a city with $n$ inhabitants, clubs are organized in such a way that any two clubs have, and any three clubs do not have, a common member. What is the maximum number of clubs that can be organized this way?
Let the number of clubs be $k$.

The second part of the condition means that a person can attend at most two clubs.

Assign to each pair of clubs one of their common members. (According to the first part of the condition, they have a common member.) Since a person cannot attend more than two clubs, the $\binom{k}{2}$ selected people are all different. Since there are $n$ people living in the city, this means that

$$
\binom{k}{2} \leq n
$$

Conversely, if condition (1) is satisfied, it is possible to organize $k$ clubs: we distribute $\binom{k}{2}$ people among the pairs of clubs, and the remaining $n-\binom{k}{2}$ people do not attend any club. This ensures that any two clubs have exactly one, but no three have a common member.

The maximum number of clubs is thus the largest positive integer $k$ for which (1) holds. Rearranging (1):

$$
\frac{k(k-1)}{2} \leq n, k^{2}-k \leq 2 n,\left(k-\frac{1}{2}\right)^{2} \leq 2 n+\frac{1}{4}, k \leq \frac{1}{2}+\sqrt{2 n+\frac{1}{4}}
$$

The largest such $k$ is $\left[\frac{1}{2}+\sqrt{2 n+\frac{1}{4}}\right]$.