How to prove $(\phi-1)(\phi-2)...(\phi-p) = \sqrt{5} + p\left(\frac{1}{2}+A\sqrt{5}\right) \bmod p^2$?

Start with $$(\phi-i)(\phi-(p+1-i))=\phi^2-\phi(p+1)+i(p+1-i)=p(i-\phi)+(1+i-i^2).$$ Using this for $i=1,2,\ldots,(p-1)/2$ we get $$ \prod_{j=1}^p(\phi-j)=\left(\phi-\frac{p+1}2\right)\prod_{i=1}^{(p-1)/2}\left(p(i-\phi)+(1+i-i^2)\right). $$ Expand the brackets and take it modulo $p^2\mathbb{Z}[\phi]$. We get $$ M:=\left(\phi-\frac{p+1}2\right)\prod_{i=1}^{(p-1)/2}\left(1+i-i^2\right)+p\left(\phi-\frac12\right)\prod_{i=1}^{(p-1)/2}\left(1+i-i^2\right)\sum_{i=1}^{(p-1)/2}\frac{i-\phi}{1+i-i^2}. $$ Denote $T=\prod_{i=1}^{(p-1)/2}\left(1+i-i^2\right)$. Considering $M$ modulo $p$ we get $-\sqrt{5}T/2$, thus by your calculation of $M$ modulo $p$ we get $T\equiv -2\pmod p$. Next, we should look mod $p$ for $$ \frac{M-\sqrt{5}}{p}=-\sqrt{5}\frac{T+2}{2p}+T\left(-\frac12-\frac{\sqrt{5}}2\sum_{i=1}^{(p-1)/2}\frac{i-\phi}{1+i-i^2}\right). $$ And here we should look for ``rational'' part, which must be equal to $\frac12$ modulo $p$. This rational part equals $$ T\left(-\frac12-\frac54\sum_{i=1}^{(p-1)/2}\frac{1}{1+i-i^2}\right), $$ and our claim reduces to $$ \sum_{i=1}^{(p-1)/2}\frac{1}{1+i-i^2}\equiv -\frac15 \pmod p. $$ This can not be hard and it is not. We have $1+i-i^2=5/4-(i-1/2)^2$. The guys $(i-1/2)^2$ run over the set $\mathcal{R}$ of all non-zero quadratic residues when $i$ goes from 1 to $(p-1)/2$ (indeed, they are quadratic residues for sure, non-zero and mutually distinct: if $(i-1/2)^2=(j-1/2)^2$, then either $i=j$ or $p$ divides $i+j-1$ which can non be in our range). So we should have $\sum_{r\in \mathcal{R}} 1/(5/4-r)=-1/5$. Denote $f(x)=\prod(x-r)=x^{(p-1)/2}-1$. We should prove $\frac{f'(5/4)}{f(5/4)}=-1/5$. This is true: $f(5/4)=-2$, $f'(5/4)=\frac{p-1}2\cdot (-1)\cdot \frac45=\frac25$.


The question needs some clarification. By "what about $\cdots\mod p^2$" you already mean something not in $\mathbb{F}_p$.

My understanding is that you take the ring $R = \mathbb{Z}[\phi]$, which is the integer ring of $\mathbb{Q}(\sqrt{5})$, and consider $S = \prod_{i = 1}^p(\phi - i)$ in the quotient ring $R/p^2R$.

The claim is then that there exists a rational integer $A$ such that $S$ is equal to $\sqrt{5} + p(\frac{1}{2} + A\sqrt{5})$ in $R /p^2R$, where $\sqrt{5}$ is defined as $1 - 2\phi$, and $\frac{1}{2}$ is understood as the inverse of $2$ in $R/p^2R$.


This is then a verifiable result. I can confirm that it is true for all prime numbers $p < 1000$ with $p=\pm2\mod5$.

For a proof, I start with re-writing the claim. We view $\mathbb{Z}/p^2\mathbb{Z}$ as a subring of $R/p^2R$. Then the claim can be restated as:$ \sqrt{5}(S - \frac{p}{2})\in\mathbb{Z}/p^2\mathbb{Z}$.

This of course is equivalent to saying that the non-trivial element $\sigma$ of the Galois group of $\operatorname{Gal}(\mathbb{Q}[\sqrt{5}]/\mathbb{Q})$ fixes this element, or: $\sigma(S - \frac{p}{2}) = -(S - \frac{p}{2})$.

Writing down everything, we have the equivalent formulation:

$$\prod_{i = 1}^p(\phi - i) - \prod_{i = 0}^{p - 1}(\phi + i) = p\mod p^2R.$$


And I'm still not able to prove this.

But I hope this question at least makes sense now.