Gaps in dense sidon sets

We prove that if A ⊂ [1, N ] is a Sidon set with N1/2−L elements, then any interval I ⊂ [1, N ] of length cN contains c|A|+EI elements of A, with |EI | ≤ 52N(1+ c1/2N1/8)(1+L + N−1/8), L+ = max{0, L}. In particular, if |A| = N + O(N), and g(A) is the maximum gap in A, we deduce that g(A) ? N. Also we prove that, under this condition, the exponent 3/4 is sharp.