TITLE: Residues of $\frac{1}{\prod_{i=1}^n (x-P_i)^{e_i}}$
QUESTION [12 upvotes]: This is a problem occurring in my research about deformations of $\mathbb{Z}/p^n$-covers over a ring of power series. Given an algebraically closed field $k$ of characteristic $p>0$, suppose $1< e_i <p$ for $i=1,2, \ldots, n$ are integers ($n \ge 2$). Then I conjecture that there exists some distinct $P_i$'s in $k$ such that
$$ \text{Res}_{P_i}(\frac{1}{\prod_{i=1}^n (x-P_i)^{e_i}})=0, $$
for all $i$ if any only if $\sum_{i=1}^n e_i \ge p+n$ and $\sum_{i=1}^n e_i \not \equiv 1 \pmod p$. $\text{Res}_{P_i}$ here stands for the Residue at $P_i$, i.e. the $-1$ coefficient of the Laurent series expansion of the function at $x=P_i$. The condition on the residues tells us whether the fraction can be a derivative of a rational function.
Here is a little bit more background about the question. I am studying whether there could be a deformation of an Artin-Schreier cover branched at one point with ramification jump $\sum_{ i=1}^n e_i -1$ to an Artin-Schreier cover branched at $n$ points $\{Q_1, Q_2, \ldots, Q_n\}$ with ramification jump $e_i-1$ at $Q_i$ over $k[[t]]$. Thus, $e_i$ is not congruent to $1 \pmod p$. The conjecture, if correct, will prove that a deformation as before exists if and only if $\sum_{ i=1}^n e_i \ge p+n$.
I am able to prove it for $n=2$ by explicitly calculating the residue or applying the Cartier operator to the fraction. For $n\ge 3$, the conjecture still holds in all the examples I've checked using Gröbner bases. I believe that Gröbner bases would work if one tries hard enough. I would love to hear other ideas!
I have just added one condition that $\sum e_i \not \equiv 1 \pmod p$. That actually makes it much more interesting since I believe this conjecture determines the deformations of a $\mathbb{Z}/p$-cover that branched at one point with ramification jump $\sum_{ i=1}^n e_i -1$. Hence, $\sum_{ i=1}^n e_i -1$ is not congruent to $0$ modulo $p$ by Artin-Schreier theory.
Below is my proof for the case $n=2$. One might assume that $P_1=0$. Consider the rational function
$$ \omega=\frac{1}{x^{e_1}(x-Q)^{e_2}}=\frac{x^{p-e_1}(x-Q)^{p-e_2}}{ x^p(x-Q)^p}. $$
One might check that if $f'=g$ then $(fh^p)'=gh^p$ in characteristic $p>0$. Thus, $\omega$ is a derivative of some rational functions if and only if $x^{p-e_1}(x-Q)^{p-e_2}$ is. The later is a derivative if and only if all the $kp-1$ coefficients are equal to $0$. Suppose $e_1+e_2 \ge p+2$. Then $2p-(e_1+e_2) \le p-2$. Thus it is clearly a derivative since all the $kp-1$ coefficients are equal to $0$. Suppose $e_1+e_2 < p+2$. Then $2p-(e_1+e_2) > p-2$ and the $p-1$th coefficient is not zero when $Q$ is different from zero.
Update: Gjergji Zaimi gave a counter example where $p=7, n=7$ and all $e_i=2$. Another counter-example is $p=7, n=4$ with $e_1=e_2=e_3=2, e_4=6$. So my conjecture is false! My question right now is whether there is a sufficient condition on $e_i$'s for $\frac{1}{\prod_{i=1}^n (x-P_i)^{e_i}}$ to be a derivative of some rational functions.

REPLY [8 votes]: If we restrict to the case when $e_1=e_2=\cdots=e_n=2$ the right condition is $\sum_{i=1}^n e_i=n+kp$ or $n+kp+1$ for some $k\geq 1$. This provides counterexamples to the stated conjecture (see below) and it shows that the right condition is more complicated than just one inequality.
Here is a proof of my claim: The residue in this case has a simple formula
$$\operatorname{Res}_{P_i}\left(\frac{1}{\prod_{i=1}^n(x-P_i)^2}\right)=\frac{2}{\prod_{j\neq i}(P_i-P_j)^2}\left(\sum_{j\neq i}\frac{1}{P_j-P_i}\right)$$
from which we conclude that
$$\operatorname{Res}_{P_i}=0 \iff \sum_{j\neq i}\frac{1}{P_j-P_i}=0.$$
Using the fact that
$$\frac{d^2}{dx^2}\left(\prod_{i=1}^n (x-P_i)\right)=\frac{1}{2}\sum_{i=1}^n\left(\prod_{j\neq i}(x-P_j)\sum_{j\neq i}\frac{1}{x-P_j}\right)$$
we notice that $\sum_{j\neq k}\frac{1}{P_j-P_k}=0$ is equivalent to the second derivative of $\prod_{i=1}^n(x-P_i)$ vanishing at $P_k$. Since the degree of the second derivative is $n-2$, the only way it can vanish at $n$ distinct points is if it is equal to $0$. So we have proven that
$$\operatorname{Res}_{P_i}=0 \quad \text{for all i}\iff \frac{d^2}{dx^2}\left(\prod_{i=1}^n (x-P_i)\right)=0$$
By looking at the leading coefficient we see that the degree can only be $0$ or $1\pmod{p}$. Or, in other words, $\sum_{i=1}^n (e_i-1)\in \{p,p+1,2p,2p+1,\dots\}$. To show that each of these degrees work you can take $P_i$'s to be the roots of polynomials $x^{kp}-x-1$ and $x^{kp+1}-1$, respectively (both polynomials have distinct roots, and their second derivatives vanish).
For an explicit counter example to your conjecture look at $p=5, n=7$ with all $e_i=2$. We have $\sum e_i=14\neq 1\pmod 5$. Yet there exists no choice of distinct $P_i$ for which $\operatorname{Res}_{P_i}=0$ for all $i$.