  Fix integers $r\geq 4$ and $i\geq 2$. Let $C$ be a non-degenerate, reduced
and irreducible complex projective curve in $\mathbb P^r$, of degree $d$, not
contained in a hypersurface of degree $\leq i$. Let $p_a(C)$ be the arithmetic
genus of $C$. Continuing previous research, under the assumption $d\gg
\max\{r,i\}$, in the present paper we exhibit a Castelnuovo bound $G_0(r;d,i)$
for $p_a(C)$. In general, we do not know whether this bound is sharp. However,
we are able to prove it is sharp when $i=2$, $r=6$ and $d\equiv 0,3,6$ (mod
$9$). Moreover, when $i=2$, $r\geq 9$, $r$ is divisible by $3$, and $d\equiv 0$
(mod $r(r+3)/6$), we prove that if $G_0(r;d,i)$ is not sharp, then for the
maximal value of $p_a(C)$ there are only three possibilities. The case in which
$i=2$ and $r$ is not divisible by $3$ has already been examined in the
literature. We give some information on the extremal curves.
