= Minimum excluded positive integer
{title2=$\min(\mathbb Z_{>0}\setminus S)$}
For a finite <set> $S$ of <positive integers>, its minimum excluded positive integer is
$$
\min(\mathbb Z_{>0}\setminus S).
$$
For example, $S=\{1,2,4\}$ gives three, while $S=\{2,4\}$ gives one. The answer lies between one and $|S|+1$, since those $|S|+1$ candidates cannot all lie in $S$.
The ordinary <minimum excludant> permits zero and would be zero for either example, because $S$ contains only <positive integers>. Choosing the positive or nonnegative convention is therefore part of the definition of the desired result.
Back to article page