Euler characteristic of Weierstrass divisor [closed]

I have a strong feeling that, for a compact connected Riemann surface $X$ of genus $g>0$, the Euler characteristic of the Weierstrass divisor $W$ equals $$\chi(X,\mathcal{O}_X(W)) = (g-1)^2.$$ Is this true?

By Riemann-Roch, the Euler characteristic is given by $$\chi(X,W) = g^3 -g + 1- g = g^3-2g+1.$$

This is not equal to $(g-1)^2$ for $g>1$.

-

closed as too localized by Angelo, Qiaochu Yuan, Dan Petersen, Felipe Voloch, Mark SapirJan 7 '12 at 19:12

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Just apply Riemann-Roch: the divisor $W$ has degree $g^3 - g$. I voted to close as "Too localized". – Angelo Jan 7 '12 at 7:19
You're right. I asked this question too quickly. – Harized Jan 7 '12 at 7:20

$$\sum_{p\in X} w(p) = (g-1)g(g+1).$$
By Riemann-Roch, the Euler characteristic then equals $g^3-2g+1$, which is different from your formula.