Prime number and golden ratio I think the following is true, but can't show it.

Let $p$ be a prime number, and let $f(x)$ be a polynomial which satisfies
$${\Bigl(1-x+\frac{1}{x}\Bigr)}^p-1=f(x)+f\Bigl(-\frac{1}{x}\Bigr).$$
Then
$$f(0)\neq0\pmod{p^2}.$$

This question is equivalent to my previous question.
 A: In this answer I'll prove the identity
$$4f(0)\equiv -p\sum_{k=1}^{(p-1)/2}\frac{5^k-1}k\pmod{p^2}\tag 1$$
which can be useful in order to solve the main problem.

If $p\equiv 1\pmod 5$ or $p\equiv 4\pmod 5$, then the equation $x^2-x-1$ has two roots in $\Bbb Z/p\Bbb Z$, say $u,v$.
If $\delta$ denote the $p$-derivation $x\mapsto\frac{x-x^p}p$, then from (1) we get:
$$4f(0)\equiv-2p(u-3)\delta(u)\pmod{p^2}$$
Since $u\not\equiv 3\pmod p$, we get $f(0)\equiv 0\pmod{p^2}$ if and only if $\delta(u)\equiv 0\pmod p$ which is equivalent to $u^{p-1}\equiv 1\pmod{p^2}$.

proof of (1): Starting from
\begin{align}
\left(x-\frac 1x+1\right)^p
&=\sum_{a+b+c=p}\frac{p!}{a!b!c!}x^a\left(-\frac 1x\right)^b\\
&=\sum_{a+b+c=p}\frac{p!}{a!b!c!}(-1)^bx^{a-b}
\end{align}
we get for odd $p$
\begin{align}
2f(0)
&=-1+\sum_{2a+c=p}\frac{p!}{(a!)^2c!}(-1)^b\\
&=-1+\sum_{a=0}^{(p-1)/2}\frac{p!}{(a!)^2(p-2a)!}(-1)^a\\
&=\sum_{a=1}^{(p-1)/2}\frac{p!}{(a!)^2(p-2a)!}(-1)^a\\
&=p\sum_{a=1}^{(p-1)/2}\frac{(p-1)!}{(a!)^2(p-2a)!}(-1)^a
\end{align}
Now
\begin{align}
\frac{(p-1)!}{(p-2a)!}
&=\prod_{n=1}^{2a-1}(p-n)\\
&\equiv-\prod_{n=1}^{2a-1}n\\
&\equiv -(2a-1)!\pmod p
\end{align}
hence
$$2f(0)\equiv -p\sum_{a=1}^{(p-1)/2}(-1)^a\frac{(2a-1)!}{(a!)^2}\pmod{p^2}$$
Recall that
$$(-1)^a\binom{2a}a=4^a\binom{-1/2}a\equiv 4^a\binom{(p-1)/2}a\pmod p$$
Starting from
$$\sum_{a=0}^{(p-1)/2}\binom{(p-1)/2}ax^a=(1+x)^{(p-1)/2}$$
we get
\begin{align}
\sum_{a=1}^{(p-1)/2}\binom{(p-1)/2}a\frac{x^a}a
&=\sum_{a=1}^{(p-1)/2}\binom{(p-1)/2}a\int_0^x t^{a-1}\mathrm dt\\
&=\int_0^x\frac{(1+t)^{(p-1)/2}-1}t\mathrm dt\\
&=\int_1^{1+x}\frac{u^{(p-1)/2}-1}{u-1}\mathrm du\\
&=\sum_{k=1}^{(p-1)/2}\int_1^{1+x}u^{k-1}\mathrm du\\
&=\sum_{k=1}^{(p-1)/2}\frac{(1+x)^k-1}k
\end{align}
Finally, for $x=4$, we get
\begin{align}
\sum_{k=1}^{(p-1)/2}\frac{5^k-1}k
&=\sum_{a=1}^{(p-1)/2}\binom{(p-1)/2}a\frac{4^a}a\\
&\equiv\sum_{a=1}^{(p-1)/2}\frac{(-1)^a}a\binom{2a}a\\
&\equiv 2\sum_{a=1}^{(p-1)/2}(-1)^a\frac{(2a-1)!}{(a!)^2}\pmod p
\end{align}
from which the assertion follows.
