Positive dimension for modular forms with weight 2. I am reading William A. Stein's book "Modular Forms: A Computational Approach". In Chapter 3 of this book, he studies Modular Forms of Weight 2. One can also refer to the following website about this Chapter.
 Modular Forms of Weight 2.
I used Sage to calculate dimension for $M_2(\Gamma_0(N))$ and I found that for $N>1$ the space $M_2(\Gamma_0(N))$ has positive dimensions. Then I tried to prove this by using the dimensional formula in Diamond and Shurman's book concerning to elliptic point of order 2, 3 and $\infty$. I failed.
Is this claim right? Does the space $M_2(\Gamma_0(N))$ have positive dimensions
for all $N>1$?

I also believe that it is right because @Somos pointed that the OEIS sequence A111248 gives the dimension of $M_2(\Gamma_0(N))$ for $N<1000$. Now I am wondering how to prove it.
Any help would be appreciated!:)
 A: The Eisenstein Series
$$E_2(\tau) = 1 - 24 \sum_{n=1}^{\infty} \frac{n q^n}{1 - q^n}$$
is not quite an element of $M_2(\Gamma_0(1)) = 0$; although it satisfies $E_2(\tau+1) = E_2(\tau)$,
it "only" satisfies
$$E_2\left(\frac{-1}{\tau}\right) = \tau^2 E_2(\tau) - \frac{6 i \tau}{\pi}.$$
On the other hand, if $N$ is any integer, then, if one lets
$$E^*_2(\tau) = E_2(\tau) - N E_2(N \tau),$$
an elementary argument shows that $E^*_2(\tau) \in M_2(\Gamma_0(N))$, and it is clearly non-zero for $N > 1$. So the dimension is always at least one. 

For a second argument, the space of weight two modular forms is given by $H^0(X_0(N),\Omega^1_X(\infty))$,
the holomorphic differentials on the compactified modular curve with at worst simple poles at the cusps $\infty$. (Equivalently, holomorphic forms on the upper half plane whose Fourier expansion only has non-negative powers of $q$ --- at infinity $2 \pi i d \tau = dq/q$ so non-cusp forms have simple poles at cusps). One way to construct such a form is as follows.
Let $\Delta(\tau) \in S_{12}(\Gamma_0(1))$ be the Ramanujan Delta function which is non-vanishing away from the cusp, where it has a simple zero. Thus $\Delta(N \tau)/\Delta(\tau)$ is a meromorphic function on $X_0(N)$ which is holomorphic away from the cusps where it
 has at worst a simple pole. But then
$$ \frac{d}{d \tau} \log \left(\frac{\Delta(N \tau)}{\Delta(\tau)}r\right)$$
is a holomorphic differential with at worst simple poles at the cusps, so gives an element of $H^0(X_0(N),\Omega^1_X(\infty))$, which is non-zero for $N > 1$.
Exercise: These two constructions give the same modular form up to  a scalar.
A: Yes. The OEIS sequence A111248 gives the dimension of
 $\, M_2(\Gamma_0(N)) \,$ and has a link to a document "Modular Forms on $SL_2(\mathbb{Z})$" by Steven Finch which has over 100 bibliography items. Also see Jeremy Rouse and John J. Webb, On Spaces of Modular Forms Spanned by Eta-Quotients.
