Solution:
Let k be the number of possible pairs. Then the sum S of the 2k numbers occurring in them can be estimated in two directions:
S≥1+2+…+2k=k(2k+1) (all numbers are distinct) and
S≤n+(n−1)+…+(n−k+1)=nk−21k(k−1) (all sums are distinct and ≤n).
For n≥3, since k>0, this yields, after dividing by k, the inequality 2k+1≤n−21(k−1), from which k≤52n−1 follows. Hence there are at most ⌊52n−1⌋ possible pairs
(⌊x⌋ denotes the largest integer ≤x). For n<3 it is obvious that k=0.
Now, for n≥3, we give a construction with exactly ⌊52n−1⌋ pairs. For this, let first n=5m+3, so k=2m+1. The following table shows the pairs and their sums, where for small m some columns must be struck out because of ambiguity of the terms:
The
2m+1 pairs contain all numbers from
1 to
4m+2; their sums range from
3m+3 to
5m+3 and are evidently distinct and not greater than
n.
The same construction also works for n=5m+4 and n=5m+5 (m≥0), because here again k=2m+1. For n=5m+2, k=2m suffices. Therefore, in this case the last column of the table can simply be omitted. For n=5m+1, likewise k=2m, and we again omit the last column of the table and, in addition, decrease every upper number in the first row by 1. In this way all conditions are again satisfied.