# Hilbert function and isom of varieties

I'm just curious about a certain concept:

If two ideals $I$ and $J$ in a polynomial ring $R$ have the same Hilbert function (note: I'm not talking about the Hilb polynomial), then are their supports ($\operatorname{Spec}(R/I)$ and $\operatorname{Spec}(R/J)$) isomorphic?

Consider the ideals $I = (x^2, xy, y^3)$ and $J = (x^2, y^2)$ of $k[x,y]$. They have the same Hilbert functions: $$A = k[x,y] / I = k \oplus kx \oplus k y \oplus k y^2, \\ B = k[x,y] / J = k \oplus kx \oplus ky \oplus kxy.$$ These two rings are not isomorphic because the zero ideal of $A$ is reducible ($I = (x,y^3) \cap (x^2, y)$), while the zero ideal of $B$ is irreducible. When the field $k$ is finite with $q$ elements, there is another way of seeing this: the set $\{ a \in A \mid a^2 = 0 \} = kx \oplus ky^2$ has cardinality $q^2$, while $\{ b \in B \mid b^2 = 0 \} = (kx \oplus kxy) \cup (ky \oplus kxy)$ has cardinality $2q^2 - q$.