Fix integers rge 4 and ige 2 (for r=4 assume ige 3). Assume that the rational number s defined by the equation left( {begin{array}{c}i+1 2end{array}}right) s+(i+1)=left( {begin{array}{c}r+i iend{array}}right) is an integer. Fix an integer dge s. Divide d-1=ms+epsilon, 0le epsilon le s-1, and set G(r;d,i):=left( {begin{array}{c}m 2end{array}}right) s+mepsilon. As a number, G(r; d, i) is nothing but the Castelnuovo’s bound G(s+1;d) for a curve of degree d in {mathbb {P}}^{s+1}. In the present paper we prove that G(r; d, i) is also an upper bound for the genus of a reduced and irreducible complex projective curve in {mathbb {P}}^r, of degree dgg max {r,i}, not contained in hypersurfaces of degree le i. We prove that the bound G(r; d, i) is sharp if and only if there exists an integral surface Ssubset {mathbb {P}}^r of degree s, not contained in hypersurfaces of degree le i. Such a surface, if existing, is necessarily the isomorphic projection of a rational normal scroll surface of degree s in {mathbb {P}}^{s+1}. The existence of such a surface S is known for rge 5, and 2le i le 3. It follows that, when rge 5, and i=2 or i=3, the bound G(r; d, i) is sharp, and the extremal curves are isomorphic projection in {mathbb {P}}^r of Castelnuovo’s curves of degree d in {mathbb {P}}^{s+1}. We do not know whether the bound G(r; d, i) is sharp for i>3.