Abstract: A sharp upper bound for the maximum integer not belonging to an ideal of a numerical semigroup is given and the ideals attaining this bound are characterized. Then, the result is used, ...