Let $S \subset \mathbb{N}$. We say $S$ is of type $B_2(g)$ if the number of representation of the form $n = s_1 + s_2 \ (s_1 \leq s_2)$ is bounded by $g$ for every $n \in \mathbb{N}$. Let $S(n)$ be the number of elements of $S$ not exceeding $n$.
There is a theorem by Erdos and Renyi, which states that for any $\epsilon > 0$,
there exists $g =g(\epsilon)$ and a set $S \subseteq \mathbb{N}$ such that
$S$ is of type $B_2(g)$ and
$$
S(n) > n^{1/2 - \epsilon}
$$
for $n$ sufficiently large. My question is, is this best up to $\epsilon$?
In other words, if $S$ is of type $B_2(g)$, then does it follow that
$$
S(n) \ll n^{1/2}
$$
for $n$ sufficiently large? I am guessing that this is the case,
but I was wondering if someone could possibly explain this to me.
Thank you!