# Representation Functions

I came across the following problem about representation functions:

Produce a set $A$ such that $r(n) > 0$ for all $n \in [1,N]$, but with $|A| \leq \sqrt{4N+1}$.

Note that $$r(n) = \left|\{(a, a'): a, a' \in A, n = a+a' \} \right|$$

I think $A = \{0,1,2 \}$ would work with the interval being $[1,4]$. Then $3 \leq \sqrt{17}$.

A second part of the question shows that one can prove that $|A| \leq \sqrt{N}$ if it satisfies the above conditions. But $3 > \sqrt{4} = 2$. Does this mean that my set $A$ is wrong?

-

It should be $|A|\ge\sqrt{N}$, since you need at least that many numbers in $A$ to form enough pairs to produce all the $N$ numbers.