# Integers with small residues modulo all integers

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$.)

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$.