  Let $C$ be a smooth curve embedded in a smooth quasi-projective threefold
$Y$, and let $Q^n_C=\textrm{Quot}_n(\mathscr I_C)$ be the Quot scheme of length
$n$ quotients of its ideal sheaf. We show the identity
$\tilde\chi(Q^n_C)=(-1)^n\chi(Q^n_C)$, where $\tilde\chi$ is the Behrend
weighted Euler characteristic. When $Y$ is a projective Calabi-Yau threefold,
this shows that the DT contribution of a smooth rigid curve is the signed Euler
characteristic of the moduli space. This can be rephrased as a DT/PT
wall-crossing type formula, which can be formulated for arbitrary smooth
curves. In general, the formula is shown to be equivalent to a certain Behrend
function identity.
