Let $A=\{a_1<a_2<a_3<\dots< a_k\}\subset\{1,2,\dots,N\}$ be a set of integers. Let $r_A(n)=\#\{(a_i,a_j):a_i+a_j=n\}$ be the number of representations of $n$ as a sum of two elements from $A$. In typical parlance, $A$ is a Sidon set (or $B_2$ set) if $r_A(n)\le 2$ for all $n$. It is known that the maximum size of a Sidon set that is a subset of $\{1,2,\dots,N\}$ is $\sqrt{N}(1+o(1))$.
My question, in general terms, is to ask if we can measure how often (and how much) $r_A(n)$ must exceed $2$, if $A$ contains at least $(1+\epsilon)\sqrt{N}$ elements, for some $\epsilon>0$?
More concretely, let $E(A)$ denote the "eccentricity" of $A$, given by $$E(A) = \sum_n \max\{r_A(n)-2,0\}. $$ If $|A|>(1+\epsilon)\sqrt{N}$ for some $\epsilon>0$, then must there exist some $\delta>0$ such that $E(A)>\delta N$?
My impetus for asking this question comes from my attempts to understand the binary digits of $\sqrt{2}$. Currently it is known that the number of $1$'s in the first $N$ binary digits of $\sqrt{2}$ is $\ge \sqrt{2N}(1+o(1))$, and for some infinite sequence of $N$'s this can be improved to $\ge \sqrt{8N/\pi}(1+o(1))$. However, this bound comes in part from assuming that the set of indices of the $1$'s behaves like a Sidon set, which it is too large to actually be. If it could be shown that $E(A)>\delta N$, then I believe a stronger lower bound could be proven.