Sorry if this is trivial: it is well-known that the number of sums of two
squares less than $X$ is asymptotic to $CX/\log(X)^{1/2}$ for some $C$.
Is this a general phenomenon ? More precisely, if $A$ and $B$ are subsets of the natural numbers whose counting functions $|A(X)|$ and $|B(X)|$ are $O(X^{1/2})$, it it true that $|(A+B)(X)|$ is $o(X)$ (or perhaps always
$O(X/\log(X)^{1/2})$ ?



$|(A+B)(X)|=o(X)$ if $|A(X)|=O(X^{1/2})$ and $|B(X)|=O(X^{1/2})$?
This is false in general. If you take $A$ and $B$ to be sets consisting of numbers with only 1's in their even (respectively odd) positions up to $2^{2n}$, then $|A|=|B|=2^n$ but $|A+B|=2^{2n}$.


