Solution (source code)

= Solution

Choose the rational point $x=[1:0:\cdots:0]$ and the <coherent sheaf> $\mathcal F=i_*k$ supported there. By <skyscraper sheaf cohomology>, $H^0(X,\mathcal F)=k$.

Its <dual of a sheaf> $\mathcal F^\vee=\mathcal H om(\mathcal F,\mathcal O_X)$ is zero. Away from $x$ its source is zero. At $x$, a homomorphism $k\to\mathcal O_{X,x}$ must send one to an element annihilated by the maximal ideal. Since $n>0$, that ideal contains a nonzero coordinate parameter; the local ring is an <integral domain>, so the image must vanish. This proves that every local homomorphism vanishes. Consequently
$$
\boxed{\dim_kH^0(X,\mathcal F)=1,\qquad\dim_kH^n(X,\mathcal F^\vee(-n-1))=0.}
$$
There is no contradiction with <Serre duality>: the ordinary sheaf dual suffices for locally free sheaves, but general coherent sheaves require an <Ext functor>. This example illustrates <failure of ordinary sheaf-dual Serre duality for a skyscraper sheaf>.