Let $M_n = \{ x \in \Bbb{Z}: x^2 = 1 \pmod n\}$. It is a multiplicative submonoid of $\Bbb{Z}$.
When $\gcd(a,b) = 1$ then we have:
$$ x^2 = 1\pmod {a,b} \iff \\ x^2 = 1\pmod {ab} $$
by the Chinese remainder theorem, which means $M_{ab} = M_a \cap M_b$.
My question is, do we have a formula for $M_{p^k}$ where $p^k$ is the $k$th power of a prime $p$?
What is known: if $n \mid m$ then $M_m \subset M_n$. So we have that $M_{p^k} \subset M_{p^{k-1}}$ for all $k \geq 2$.
For $p \gt 2$ we can't have both $x-1, x+1 \in (p)$ so if $x^2 - 1 \in (p^k)$ it's true that either $x-1 \in (p^k)$ or $x + 1 \in (p^k)$ but not both.
Hensel's lemma states that for any polynomial function $f(x)$, in this case $f(x) = x^2 - 1$, if it has a simple root over $\mathbb{Z}/p\mathbb{Z}$ for prime $p$, then there is a unique corresponding root over $\mathbb{Z}/p^n\mathbb{Z}$, which can be found by iteratively using Hensel lifting from $\mathbb{Z}/p\mathbb{Z}$.