# Let $p>2$ be a prime, $f(x)=\sum_{k=1}^{p-1}x^k/k$, $f(2)-f(-1)=m/n$, where $\gcd(m,n)=1$. Show that $p\mid m$.

Let $p>2$ be a prime and $f(x)=\sum_{k=1}^{p-1}x^k/k$. Suppose that $f(2)-f(-1)=m/n$, where $\gcd(m,n)=1$. Show that $p\mid m$.

Wolstenholme's theorem for $\sum_{k=1}^{p-1}1/k$ does not help here. It is easy to see that we only need to prove that $$\sum_{k=1}^{p-1}\frac{(p-1)!}{k}2^k\equiv\sum_{k=1}^{p-1}\frac{(p-1)!}{k}(-1)^k\pmod p.$$ According to Wilson's theorem we have $(p-1)!\equiv-1\pmod p$. If we denote by $k^{-1}$ the multiplicative inverse of $k$ in $\mathbb{Z}/p\mathbb{Z}$, then this is $$\sum_{k=1}^{p-1}k^{-1}2^k\equiv\sum_{k=1}^{p-1}k^{-1}(-1)^k\pmod p.$$ I calculated the cases $p=3,5,7,11$ but could get nowhere. How do I proceed? Any hints will be appreciated.

• I think you should modify the question for odd prime only.... – user35508 May 29 '17 at 8:17
• @user35508 You're right, I forgot that... – Colescu May 29 '17 at 10:32

Put $P(x)=f(x)-f(1-x)$, we are working in $\mathbb{F}_p(x)$. As the derivative of $f$ is $f^{\prime}(x)=\frac{x^{p-1}-1}{x-1}$, we get that
$$P^{\prime}(x)= \frac{x^{p-1}-1}{x-1}+\frac{(1-x)^{p-1}-1}{-x}$$ Using that $(1-x)^p=1-x^p$, we find that $P^{\prime}(x)=0$. As $P$ is a polynomial of degree $\leq p-1$, we get that $P$ is a constant. Now $P(0)=-f(1)$; as $k\to 1/k$ is a bijection of $\{1,\cdots,p-1\}$ onto itself (in $\mathbb{F}_p$), and that $1+2+\cdots+p-1=\frac{p(p-1)}{2}=0$, we have $f(1)=0$, hence $P=0$.
Now put $x=2$, and it is easy to finish.
• Wow, wow, wow. That was brilliant! Could you tell me how you came up with setting $P(x)=f(x)-f(1-x)$ and taking the (formal) derivative? And though a little bit off the original question, what are some other techniques that might be used in solving this kind of problems? – Colescu May 30 '17 at 2:36
• @Yuxiao Xie Difficult to answer your question. Perhaps that $x\to 1-x$ takes $2$ to $-1$, and $-1$ to $2$, and the fact that I have not a closed formula for $f$, but of course it is easy for $f^{\prime}$. – Kelenner May 30 '17 at 6:30