Minimum excludant (source code)

= Minimum excludant
{title2=$\operatorname{mex}$}

= Mex
{synonym}

= Minimum excluded value
{synonym}

The minimum excludant of a finite set of <nonnegative integers> is the smallest <nonnegative integer> absent from the set. For example, $\operatorname{mex}\{0,1,3\}=2$.