For $\epsilon<p$, let $N(\epsilon,p)$ be the smallest value of $n$ such that for any set $S \subset \mathbb Z_p$ of size $n$, there exists $\lambda\in \mathbb Z_p^{*}$, $\mu \in \mathbb Z_p$ s.t $\lambda S+\mu$ contains distinct $\{x,y,z\}$ with $0<x,y,z<\epsilon$, considered as positive integers in $[0,p]$.

**I am interested in the dependence of $N(\epsilon,p)$ on $\epsilon$ and $p$.**

In less formal language, how big a set of residues mod $p$ do you need to take to ensure that you can always find some multiple of the set that contains three elements within $\epsilon$ of each other?

A start could be made to set $\epsilon$ as a function of $p$ such as $\epsilon \approx c\ln(p)$ and look at possible bounds on N in terms of $p$.

**Update: Thank you for such excellent responses!**

**For completeness I wanted to add an obvious generalisation which is to look at r>3 values:**

For $\epsilon<p$, let $N_r(\epsilon,p)$ be the smallest value of $n$ such that for any set $S \subset \mathbb Z_p$ of size $n$, there exists $\lambda\in \mathbb Z_p^{*}$, $\mu \in \mathbb Z_p$ s.t $\lambda S+\mu$ contains r distinct values $x_i$ satisfying $0<x_i<\epsilon$, considered as positive integers in $[0,p]$.

Seva's calculation for the case $r=3$ generalises I believe to give an upper bound of $(r-2)p/\epsilon$ for $N_r(\epsilon,p)$. Similarly assuming a strong conjecture on arithmetic progressions we also get an upper bound of about $C p/\ln p$ valid for all $\epsilon>r.$

For $\epsilon \approx \ln p$ we have both bounds roughly agreeing which suggests that better bounds in this case and for general $\epsilon$ should be obtainable. I suspect though this will be quite difficult.

`$\mathbb{Z_p}$`

should be $\mathbb Z_p$`$\mathbb Z_p$`

), but I think that there is also a quantifier issue: your set $S$, defined in terms of $n$, currently appears before $n$ is introduced. It seems easy enough to edit to fix, but I'm not sure I totally understood the question, so I didn't do it. (For example, you say you want an answer that depends on $\epsilon$ and $p$, but then you say to take $\epsilon$ as a function of $p$.) $\endgroup$ – LSpice Aug 27 '19 at 13:17