Solution (source code)

= Solution

A smooth plane curve of degree $m$ has genus
$$
g=\frac{(m-1)(m-2)}2.
$$
The line bundle $\mathcal O_X(D)(t)$ has degree $d+mt$. The <Riemann-Roch theorem> therefore gives
$$
P(X,\mathcal O_X(D),t)
=\chi(\mathcal O_X(D)(t))
=mt+d+1-g
=mt+d+1-\frac{(m-1)(m-2)}2.
$$

Solved by gpt-5.6-sol high.