The roots of $X^2-1$ in the ring $(\mathbb{Z}/n\mathbb{Z})[X]$ I don't know how to prove the following.
Let $n$ be an odd natural number with $t$ different prime divisors. Then the polynomial $X^2-1$ has exactly $2^t$ roots.
Own tries
First of all: $X^2-1=(X-1)(X+1)$. We say that $a \in \{1, 2, \cdots, n \}$ is a root if and only if $(a-1)(a+1)=kn$ for some integer $k$. Now observe that $p|(a-1) \iff p\nmid(a+1)$, except when $p=2$. If $a$ is odd, $2$ divides both $a+1$ and $a-1$. If $a$ is even, $2$ divides neither. Luckely $n$ is odd. This means that a prime divisor $p$ from $n$ only can appear in maximal one of the numbers $a+1, a-1$. 
It looks like we only need to prove that there exists $k \in \mathbb{Z}$ so that $p$ appears in at least  one of these numbers: $kn+a-1, kn+a+1$, because, be previous observations, there are exactly $2^t$ was to "arrange" prime divisors in the factorisation of $\bar{a}-\bar{1}$ and $\bar{a}+\bar{1}$. Is this correct?
 A: I think that your method might work.  However, I would say that it is easier to use the Chinese Remainder Theorem to go from the problem
$$
x^2 \equiv 1 \pmod n
$$
To the isomorphic system of equations
$$
x^2\equiv 1 \pmod{{p_1}^{k_1}}\\
x^2\equiv 1 \pmod{{p_2}^{k_2}}\\
\vdots\\
x^2\equiv 1 \pmod{{p_t}^{k_t}}
$$
That is,
$$
x\equiv \pm1 \pmod{{p_1}^{k_1}}\\
x\equiv \pm1 \pmod{{p_2}^{k_2}}\\
\vdots\\
x\equiv \pm1 \pmod{{p_t}^{k_t}}
$$
Making a binary choice $t$ times yields $2^t$ total possibilities.  We have thus reduced the problem to showing that
$$
x\equiv \pm1 \pmod{{p}^{k}}
$$
is the complete set of solutions to
$$
x^2\equiv 1 \pmod{{p}^{k}}
$$
For an odd prime $p$ and positive integer $k$. Hagen von Eitzen has provided a neat proof that this is the case in his answer.
A: You have noted that $X^2-1$ has exactly two solutions modulo $p$ (odd).
The next step would be to consider odd prime powers $p^k$ with $k>1$ (note the wording of the problem statement: $n=5^{17}3^8$ has exactly $t=2$ prime divisors - though it has $25$ prime factors).
Of course, $\pm1$ are still at least two distinct solutions modulo $p^k$.
And any other solution $x$ must be $\equiv \pm1\pmod p$, hence can be written as $x=ap^r\pm1\pmod {p^k}$ with $p\not |a$ and $1\le r<k$. Then $x^2-1=a^2p^{2r}\pm2ap^{r}+1-1\equiv \pm2ap^{r}\pmod{p^{r+1}} $ gives a contradiction, so there are again exactly two solutoins modulo any odd prime power.
For the general case, any combination obtained by picking a sign per prime divisor yields a solution modulo $n$ per Chinese Remainder theorem (and vice versa).
