This is a (different version to) question from Serre 'A Course in Arithmetic'.Let p be an odd prime number. $\forall n\geq 1$ (n positive integer), $f$ is defined by: $$f(n)=(-1)^n\prod_{1\le k\le n ,(p,k)=1} k$$ I wish to show: $$f(p^r) \equiv 1\mod{p^r} \space\space\space\space\space \space((\mathbb{Z}/p^r\mathbb{Z})^\times)$$ and prove that f can be expanded to continuous function $f: \mathbb{Zp} \to \mathbb{Zp} $ , Such that $|f(x)-f(y)| \leq |x-y| $.
Many thanks for your help!
If you have a group $G$ (in this case $G = (\mathbb{Z}/p^r\mathbb{Z})^{\times}$). Then $\prod_ {g^2 \neq 1} g = 1$ (rearrange the sum to pair an element with its inverse).
It follows $$\prod_ {g\in G} g = \prod_ {g^2 = 1} g.$$
If $p \geq 2,$ then $(\mathbb{Z}/p^r\mathbb{Z})^{\times}$ is cyclic and $-1$ is the only two torsion element. One concludes
$$f(p^r) \equiv (-1)^{p^r} (-1) \mod p^r \equiv 1 \mod p^r.$$