CFG for a rather complex language
Try constructing CFGs for the two related languages
$$
\{a^ib^j : 2i &gt; 3j + 1\}, \quad \{a^ib^j : 2i &lt; 3j+1\}.
$$
This can be accomplished by constructing a grammar for
$$
\{a^ib^j : 2i = 3j + 1\}
$$
and some related languages.