I want to compute the Hilbert function for the ring $$M:=\frac{k[x,y,z,w]}{(x,y)\cap(z,w)}$$ and compare it to the Hilbert function for the ring $$N:=k[x,y].$$
I tried computing the bases for each $M_i$ and $N_i$:
\begin{align} &M_1=\{x,y,z,w\} & &N_1=\{x,y\}\\ &M_2=\{x^2,xy,y^2,z^2,zw,w^2\}& & N_2=\{x^2,xy,y^2\}\\ &M_3=\{x^3,x^2y,xy^2,y^3,z^3,z^2w,zw^2,w^3\}& &N_3=\{x^3,x^2y,xy^2,y^3\}\\ &\vdots & & \vdots \end{align}
Did I compute these bases correctly? Since any elements in $(x,y)\cap(z,w)$ are identified with $0$ in $M$, it's like there are two copies of $k[x,y]$ insides of $M$. That is, there will be twice as many basis elements in $M_i$ than there are in $N_i$. So then the Hilbert functions should be: $$ H_M(t)=\begin{cases} 0&\text{ if $t\leq 0$}\\ 2(t+1)&\text{ if $t>0$} \end{cases} \;\;\;\;\;\; H_N(t)=\begin{cases} 0&\text{ if $t\leq 0$}\\ t+1&\text{ if $t>0$} \end{cases} $$
Does this work?
(I'm not looking for a general theory to compute Hilbert functions yet... I was just introduced to them).
The only real error is $H_N(0) = H_M(0) = 1$. This is because the $0^{th}$ graded piece of each of these rings is $k$, which is a one dimensional $k$ vector space.
To explain my initial poor comment about you being wrong:
Using Stanley-Reisner theory, you can see very quickly that the Hilbert Series (the generating function of $H_M(t)$) is $$\frac{1 + 2x - x^2}{(1-x)^2}_.$$
At first glance, it seems like this means your answer is off. But once your start computing coefficients, you notice a pattern.
$$\frac{1+2x-x^2}{(1-x)^2} = (1+2x-x^2)(1+2x + 3x^2 + 4x^3 + \dots)$$
The constant term is $1$.
The coefficient of $x$ is $2 + 2 = 4$.
For $n \geq 2$: The coefficient of $x^n$ in this expression is $$(n+1) + 2n - (n-1) = 2n+2 = 2(n+1).$$
As to how I got that Hilbert Series:
At the risk of self-promotion: For my senior project in my undergrad degree, I wrote A Beginner's guide to Stanley-Reisner rings which you can find on my webpage. It is not great writing by any means (I was just beginning as a mathematician), but it might make what I write next make more sense.
Another way to write your ideal is $(xw, xz, yw,yz)$. This is the Stanley-Reisner ideal of the one-dimensional simplicial complex whose facets are $\{x,y\}$ and $\{w,z\}$. Once you have this, you are home free because the Hilbert-Series of the Stanley-Reisner ring is $$\frac{h_0 + h_1 x + \dots + h_d x^d}{(1-t)^d}_.$$
Where $d$ is the dimension of the simplicial complex plus one, and the $h_i$'s come from the $h$-vector of the complex (these numbers come from the combinatorics of the complex). $d$ is also the Krull dimension of the Stanley-Reisner ring.