In next theorem, we characterize the ideals that are maximum sparse.

**Proof.** On one hand, let the Frobenius number of the ideal I be $d+2g-1$. If I is a non-trivial intersection of the ideals ${I}^{\prime}$ and ${I}^{\u2033}$, whose differences are, respectively, ${d}^{\prime}$ and ${d}^{\u2033}$, then the difference d of I is strictly larger than both ${d}^{\prime}$ and ${d}^{\u2033}$. If $d+2g-1$ is not an element of I, then it is neither an element of ${I}^{\prime}$ nor an element of ${I}^{\u2033}$, but the value $d+2g-1$ is strictly larger than both ${d}^{\prime}+2g-1$ and ${d}^{\u2033}+2g-1$. This contradicts Theorem 1. This implies, by Lemma 1, that I is of the form $\mathsf{\Lambda}\backslash D\left(i\right)$ for some i. Now, $d={\nu}_{i}$ because $I=\mathsf{\Lambda}\backslash D\left(i\right)$. If ${\lambda}_{i}$ is smaller than c, then ${\nu}_{i}+2g-1\ge =2g\ge c$, hence $d+2g-1\in I$, contradicting our assumption. Consequently, ${\lambda}_{i}\ge c$ and by Lemma 2, ${\nu}_{i}=i-g+G\left(i\right)+1$. Thus, $d+2g-1=i+g+G\left(i\right)={\lambda}_{i}+G\left(i\right)$. However, $d+2g-1\notin I$, and so $G\left(i\right)=0$.

On the other hand, suppose I is of the form $\mathsf{\Lambda}\backslash D\left(i\right)$ for some i with $G\left(i\right)=0$, and so $d={\nu}_{i}$. By the former remarks, since $G\left(i\right)=0$, one deduces that ${\lambda}_{i}=i+g$ and, by Lemma 2, it follows that $d+2g-1={\lambda}_{i}\notin I$. □

**Example** **2** (Weierstrass semigroup of ${\mathcal{H}}_{4}$)**.** The Weierstrass semigroup of ${\mathcal{H}}_{4}$ is $\mathsf{\Lambda}=\{0,4,5,8,9,10,12,13,\dots \}.$ We wish to find all the maximum sparse ideals of Λ. Since the Frobenius number of Λ is 11 and $11+11=22={\lambda}_{16}$, it holds that $G\left(16\right)>0$ while $G\left(i\right)=0$ for all $i\ge 17$. This implies that all ideals of the form $\mathsf{\Lambda}\backslash D\left(i\right)$ with $i\ge 17$ are maximum sparse. Let us see now whether $G\left(i\right)=0$ for all i with $6\le i\le 15$. On one hand, $G\left(6\right)>0$ since ${\lambda}_{6}=12=11+1$; $G\left(7\right)>0$ since ${\lambda}_{7}=13=11+2$; $G\left(8\right)>0$ since ${\lambda}_{8}=14=11+3$; $G\left(9\right)=0$ because the difference between 15 and any gap is a non-gap, indeed, $\{15-1=14,15-2=13,15-3=12,15-6=9,15-7=8,15-11=4\}\subseteq \mathsf{\Lambda}$; $G\left(10\right)=0$ because the difference between 16 and any gap is a non-gap, indeed, $\{16-1=15,16-2=14,16-3=13,16-6=10,16-7=9,16-11=5\}\subseteq \mathsf{\Lambda}$; $G\left(11\right)>0$ since ${\lambda}_{11}=17=11+6$; $G\left(12\right)>0$ since ${\lambda}_{i}=18=11+7$; $G\left(13\right)=0$ because the difference between 19 and any gap is a non-gap, indeed, $\{19-1=18,19-2=17,19-3=16,19-6=13,19-7=12,19-11=8\}\subseteq \mathsf{\Lambda}$. $G\left(14\right)=0$ because the difference between 20 and any gap is a non-gap, indeed, $\{20-1=19,20-2=18,20-3=17,20-6=14,20-7=13,20-11=9\}\subseteq \mathsf{\Lambda}$. $G\left(15\right)=0$ because the difference between 21 and any gap is a non-gap, indeed, $\{21-1=20,21-2=19,21-3=18,21-6=15,21-7=14,21-11=10\}\subseteq \mathsf{\Lambda}$.

Hence, all maximum sparse ideals are ${I}_{9}=\mathsf{\Lambda}\backslash D\left(9\right)=\{4,8,9,12,13,14,16,17,18,19,20,21,22,\dots \},$ where $D\left(9\right)=\{0,5,10,15\}$, $d=4$, and $d+2g-1=15$; ${I}_{10}=\mathsf{\Lambda}\backslash D\left(10\right)=\{5,9,10,13,14,15,17,18,19,20,21,22,\dots \},$ where $D\left(10\right)=\{0,4,8,12,16\}$, $d=5$, and $d+2g-1=16$; ${I}_{13}=\mathsf{\Lambda}\backslash D\left(13\right)=\{8,12,13,16,17,18,20,21,22,\dots \},$ where $D\left(13\right)=\{0,4,5,9,10,14,15,19\}$, $d=8$, and $d+2g-1=19$; ${I}_{14}=\mathsf{\Lambda}\backslash D\left(14\right)=\{9,13,14,17,18,19,21,22,\dots \},$ where $D\left(14\right)=\{0,4,5,8,10,12,15,16,20\}$, $d=9$, and $d+2g-1=20$; ${I}_{15}=\mathsf{\Lambda}\backslash D\left(15\right)=\{10,14,15,18,19,20,22,\dots \},$ where $D\left(15\right)=\{0,4,5,8,9,12,13,16,17,21\}$, $d=10$, and $d+2g-1=21$; ${I}_{17}=\mathsf{\Lambda}\backslash D\left(17\right)=\{12,16,17,20,21,22,24,\dots \},$ where $D\left(17\right)=\{0,4,5,8,9,10,13,14,15,18,19,23\}$, $d=12$, and $d+2g-1=23$; and finally $\mathsf{\Lambda}\backslash D\left(i\right)$ for all $i>17$. Here, $D\left(i\right)=\{0,4,5,8,9,10,12,13,\dots ,i+6-12,i+6-10,i+6-9,i+6-8,i+6-5,i+6-4,i+6\}$, $d=i-5$, and $d+2g-1=i+6$.

The next corollary characterizes maximum sparse ideals of symmetric semigroups.