My question, as in the title:
What is $f(n)$ the maximum size of a subset $A\subset \Bbb Z_n$ such that $A+A \subset \Bbb Z_n^*$
where $\Bbb Z_n=\{0,1,....,n-1\}$ the ring of integers modulo $n$, $\Bbb Z_n^*$ is its group of units (i.e. multiplicative group modulo $n$) and $A+A=\{a+b, (a,b)\in A^2, a\neq b\}$
For example for primes $p$, we have $f(p)= \frac {p+1} 2$ , it is also straitforward to prove that : $$f(n)\geq \frac {n} {n-\varphi(n)+1} $$
where $\varphi(n)$ is the Euler's totient function. is this the right approximation?
Edit: This can be proven recursively, by first setting $A_0=\varnothing, B_0=\varnothing$ and in each iteration, you add a new element $x$ to $A$ and all the elements $a-x, a\notin \Bbb Z_n^* $ to B. Formally
$$ A_{k+1}=A_k \cup \{x\}, B_{k+1}=B_k \cup \{a-x, a\notin \Bbb Z_n^*\}, x\notin A_k\cup B_k $$ This construction ensures that $A_k + A_k \subset \Bbb Z_n^*$. This process terminates after $m$ steps when we can't find any new element $x\notin A_m\cup B_m$, hence when $|A_{m}|+|B_{m}|=|A_{m}\cup B_{m}| \geq n$, using the fact that $ |A_{m}|(n-\varphi(n))\geq|B_{m}|$ we can deduce that $A_{m}\geq \frac {n} {n-\varphi(n)+1} $