Let R be a homogeneous ring over an infinite field, I subset ofR a homogene
ous ideal, and a subset ofI an ideal generated by s forms of degrees d(1),.
..,d(s) so that codim(a:I)greater than or equal tos. We give broad conditio
ns for when the Hilbert function of R/a or of R/(a:I) is determined by I an
d the degrees d(1),...,d(s). These conditions are expressed in terms of res
idual intersections of I, culminating in the notion of residually S-2 ideal
s. We prove that the residually S-2 property is implied by the vanishing of
certain Ext modules and deduce that generic projections tend to produce id
eals with this property.