When Is This Possible?

Let $$n$$ be a positive integer between $$1$$ and $$2014$$ (inclusive). Suppose $$n$$ players are playing a tennis tournament. A game is played between two teams of players, where each team has two players. The teams aren't fixed; which means if $$A$$ and $$B$$ are on the same team at some game, at the next them they might be on opposite teams. It turns out that every player has each of the other players playing against him (i.e. on the opposite team) exactly once. Find the largest possible value of $$n$$ for which such a tournament is possible.

Details and assumptions

• Remark that $$1 \leq n \leq 2014.$$

• This problem is inspired by a problem from the Russian olympiad.

×