Question: I'm attempring to solve a congruence $x^2 \equiv 17\pmod{128}$ but not quite sure how to go about it. I see that $128 = 2^7$, but the Chinese Remainder Theorem doesn't apply to $\gcd > 1$. I found one solution quite easily by finding solutiong to $x^2 \equiv\pmod{32}$ which was $x \equiv 23\pmod{32}$ and it turned out that $23 + 128x\_0 \equiv 17\pmod{128}$. How do I find the other solution ans what's the proper way of doing it?

Answer: 
The [series](https://en.wikipedia.org/wiki/Binomial_theorem#Newton.27s_generalised_binomial_theorem) for the square root is
\begin{eqnarray}
\sqrt{1+16 t} =1 + 8 t - 32 t^2 + 256 t^3 - 2560 t^4 + 28672 t^5 - 344064 t^6+\\ + 
4325376 t^7 - 56229888 t^8 + 749731840 t^9 - 10196353024 t^{10}+ \cdots
\end{eqnarray}
The first three terms truncation $1 + 8 t - 32t^2$ has square $1 + 16 t - 512 t^3 + 1024 t^4$. Therefore, for $t=1$ we obtain
$$(1+8-32)^2 = 17 -512 + 1024= 17 + 512 \equiv 17 \!\!\!\!\mod 512$$

therefore, $23^2 \equiv 17 \!\!\!\!\mod 128$.

Let $x$ any other solution of $x^2 \equiv 17 \!\!\!\!\mod 128$. Then 
$y\colon =\frac{x}{23} \!\!\!\mod 128$ satisfies $y^2\equiv 1 \!\!\!\mod 128$
and for this we have $4$ solutions $\pm 1$, $\pm 65 \!\!\!\mod 128$. 

Therefore, the solutions are $\pm 23$, $\pm 23 \cdot 65 \!\!\!\mod 128$, that is 
$$23, 41, 87, 105$$
We have to solve $x^2\equiv 17 \pmod{128}$

Now,$128=2^7$

So,we are to solve an equation of the form $x^2\equiv a\pmod {2^\alpha}$

We follow the ascending method:

First we find a root of $x^2\equiv 17 \pmod{16}$ which is $x^2\equiv 1\pmod{16}$

We can see that $x\_4=1$ is a solution to the given equation.

Now the ascending method says that if $x\_i$ is a solution of $x^2\equiv a \pmod{2^i}$,then a solution of $x^2\equiv a\pmod{2^{i+1}}$ is $x\_{i+1}=x\_i+2^{i-1}k$

Putting this solution in the equation,we can find a value of $k$.

Hence we can find $x\_{i+1}$.

Using this method it is easy to see that $x\_4=1,x\_5=9,x\_6=9,x\_7=41$.

Now,the square roots of $1$ modulo $128$ are $\pm1,2^{7-1}\pm1$ .So multiplying by $41$ we get all the solutions of $x^2\equiv 17 \pmod{128}$ as $41,87,105,23$.