Let’s call $A \subset \mathbb{N}$ sparse iff for all quadruples of distinct numbers $(a, b, c, d)$ from $A$ it is true, that $a + b \neq c + d$. What is the maximal possible size of a sparse set $A$, such that $\forall a \in A$ $a \leq n$?
What have I tried:
Because addition is both commutative and invertible, for any sparse set $A$ we have $|\{a+b|a,b \in A \text{ } a \neq b \}| = \frac{|A|(|A|-1)}{2}$. And all numbers from $\{a+b|a,b \in A \text{ }a \neq b\}$ are $\leq 2n - 1$. Thus we have $\frac{|A|(|A|-1)}{2} \leq 2n - 1$ by pigeonhole principle. It means, that $|A|^2 - |A| - 2(2n-1) \leq 0$, which results in $$|A| \leq \frac{1 + \sqrt{16n - 7}}{2}$$
However, I have a feeling, that this upper bound is actually improvable...
The densest such sparse set I can think of off the top of my head consists of positive integers of the form $2^k$, which would have $\lfloor \log_2 {n} \rfloor$ members less than $n$.
Comment added by edit: This approach works because each member of the sparse set can be represented by a binary number containing a single $1$ and one or more $0$s. Adding any two of them together gives a binary number with two $1$s, but the pattern of $1$s in the sum is unique to the addends being used. It should be possible to identify one or more binary numbers having three (or perhaps more) $1$s such that the sum of that number with any of the originally identified numbers will contain either three or four $1$s, and thus not be representable by the sum of two numbers each of which contains a single $1$. For example, the binary number $1001001$ might be safely added into the set I originally identified, resulting in a larger set. I can't say how many such numbers can be accommodated below any upper limit $n$. But, the set I originally identified is definitely not the largest possible.