Let $X\subset\Bbb P^n_{\Bbb C}$ be a connected, Cohen Macaulay sub-scheme. (Possibly singular, reducible or non-reduced.) For $k\gg0$ the numbers $h^0(\mathcal{O}_X(k))$ depend polynomially on $k$. Denote this polynomial by $P(k):\stackrel{k\gg0}{=}h^0(\mathcal{O}_X(k))$ .
What is the geometric meaning of the "total defect" $\sum_{k\ge0}\Big(h^0(\mathcal{O}_X(k))-P(k)\Big)$?
e.g. if $X\subset\Bbb P^n_{\Bbb C}$ is a hypersurface of degree $d$ then this total defect is ${d\choose{n}}$, which can be interpreted in various ways. (Arithmetic genus, Euler characteristic etc.) Similarly for complete intersections. Is there some general statement? A reference?
I guess this defect is constant under flat deformations of $X$ in $\Bbb P^n$, and I'm interested in the smoothable case. So probably can assume $X$ smooth? (Does this help?)
upd. (I guess it helps.) In my case the embedding of $X$ is projectively normal. (Alternatively, $\mathcal{O}_X(k)$ is normally generated.)