Calculate Hilbert polynomials in $\mathbb{P}^2$ Can someone please help me solve this question:

Let $Z = Z(x^3+2xyz+z^2y) \subset \mathbb{P}^2.$ Find the Hilbert polynomial and the degree of $Z$?

Let $h_X$ be the Hilbert function of $Z = Z(x^3+2xyz+z^2y)$, and let $S(X)=\mathbb{K}[x,y,z]/(x^3+2xyz+z^2y)$.
By definition
$$h_X:d∈Z→\dim_{\mathbb{K}}S(X)_d\in \mathbb{N}_0,$$
and my hypothesis: that $h_{X}(d)=3d+3$ for $d\geq1$. But I can't get it proven. Is my hypothesis even correct? 
Thanks
 A: The classical way of computing Hilbert functions is to construct a free resolution of the coordinate ring of $X$. Let $S = K[x,y,z]$ and $f = x^3+2xyz+z^2y$. Then we have a free resolution of $S(X) = S/(f)$ (as a graded $S$-module) given by
$$
0 \to S(-3) \overset{f}{\to} S \to S/(f) \to 0
$$
where $S(-3)$ denotes $S$ twisted by $-3$, i.e., $S(-3)_d = S_{d-3}$. Since the sequence is exact, then for each $d \geq 0$ we have
$$
0 = \dim_K S(-3)_d - \dim_K S_d + \dim_K (S/(f))_d
$$
so
\begin{align*}
h_X(d) &= \dim_K (S/(f))_d = \dim_K S_d - \dim_K S(-3)_d = \binom{d+2}{2} - \binom{d-3+2}{2}\\
&= \binom{d+2}{2} - \binom{d-1}{2} \, .
\end{align*}
If $d \geq 1$, then
$$
\binom{d+2}{2} - \binom{d-1}{2} = \frac{(d+2)(d+1)}{2} - \frac{(d-1)(d-2)}{2} = \frac{1}{2}\left( 3d + 2 - (-3d + 2)\right) = 3d \, .
$$
So the Hilbert polynomial of $X$ is $p_X(d) = 3d$ and
$$
h_X(d) =
\begin{cases}
1 & \text{if } \ d = 0\\
3d & \text{if } \ d \geq 1 \, .
\end{cases}
$$
As a check, note that the arithmetic genus $g_a(X)$ of $X$ is $\binom{3-1}{2} = 1$. For a curve, the arithmetic genus is related to the constant term of $p_X$ by $g_a(X) = -(p_X(0) - 1)$ and indeed we have
$$
g_a(X) = 1 = -(0 - 1) = -(p_X(0) - 1)\, .
$$
For more background on computing Hilbert functions, see $\S\S1.9, 1.10$ of Eisenbud's commutative algebra book (or Ch. 15 for a comprehensive treatment) or $\S\mathrm{I}.7$ of Hartshorne.
