Given a finite set $\Lambda=\{\lambda\_1,\dots,\lambda\_d\}\in \{1,2,\dots\}^d$
of $d$ strictly positive integers, we consider 
the real number
$$\mu(\Lambda):=\sup\_{l\in\{2,3,\dots\}}\frac{1}{l}\sum\_{i=1}^d (\lambda\_i\ \ \text{mod}\ \ l),$$
where $(\lambda\_i\ \ \text{mod}\ \ l)\in\{0,\dots,l-1\}$.


Does $\mu(\Lambda)< \kappa$ imply an upper bound on $d$? (I am specially 
interested in the case $\kappa=2$ but one can consider more generally
any $\kappa>1$.) 



Integers with small residues modulo all integers
No $\kappa>1$ implies any bound on $d$. Without loss of generality, let $2\geq\kappa>1$. Assume that we have already found a $\Lambda$ of cardinality $d-1$ satisfying $\mu(\Lambda)\leq\kappa$. We shall construct a $\Lambda'$ of cardinality $d$ satisfying $\mu(\Lambda')\leq\kappa$.


Let $\lambda\_1,\dots,\lambda\_{d-1}$ be the elements of $\Lambda$, and let $\sigma$ be their sum. Choose any positive integer $\lambda\_d$ divisible by all positive integers up to $\sigma/(\kappa-1)$. We claim that $\Lambda':=\Lambda\cup\{\lambda\_d\}$ satisfies $\mu(\Lambda')\leq\kappa$, i.e. for any integer $l\geq 2$, we have
$$ \sum\_{i=1}^d (\lambda\_i\ \ \text{mod}\ \ l)\leq\kappa l.$$
We distinguish between two cases. If $l\leq\sigma/(\kappa-1)$, then the last term $(\lambda\_d\ \ \text{mod}\ \ l)$ vanishes, hence the required inequality follows from the initial assumption
$$ \sum\_{i=1}^{d-1} (\lambda\_i\ \ \text{mod}\ \ l)\leq\kappa l.$$
If $l>\sigma/(\kappa-1)$, then $(\lambda\_i\ \ \text{mod}\ \ l)=\lambda\_i$ for $1\leq i\leq d-1$, while $(\lambda\_d\ \ \text{mod}\ \ l)<l$, hence the required inequality follows from $\sigma+l<\kappa l$.


