Polynomial modulus Can anyone explain why the two solutions to $n^2+7n-2 = 0$ modulo $43$ are $n=13$ and $n=23$ and how they are found?
 A: The congruence is equivalent to $4n^2+28n-8\equiv 0\pmod{43}$ (we multiplied through by $4$.) This can be rewritten as 
$$(2n+7)^2-49-8\equiv 0\pmod{43}.$$
Equivalently, we want to solve $(2n+7)^2\equiv 14\pmod{43}$.
Since $86+14=100$, We can probably spot immediately the solution $2n+7\equiv 10\pmod{43}$ and then by symmetry $2n+7\equiv -7\pmod{43}$.
Now we have two linear congruences to solve for $n$, namely $2n+7\equiv 10\pmod{43}$ and $2n+7\equiv -10\pmod{43}$.
To solve the first, rewrite as $2n\equiv 3\equiv 46\pmod{43}$, giving solution $n\equiv 23\pmod{43}$. The other calculation is very similar.
Note that we have essentially used a version of the Quadratic Formula.
Generalizations: The procedure we used is general. Let $p$ be an odd prime, and consider the quadratic congruence $an^2+bn+c\equiv 0\pmod{p}$, where $p$ does not divide $a$. Rewrite the congruence as $4a^2+4ab+4ac\equiv 0\pmod{p}$, and complete the square as above.
But we are left with a congruence of shape $x^2\equiv d\pmod{p}$. There are easy computational methods to check whether this congruence has a solution. (Half the time it doesn't, and then the original congruence does not have a solution.)
For primes of the form $4k+3$, there is an easy way to compute the solutions when they exist, essentially by using Fermat's Theorem. For other primes $p$, there are good algorithms for solving the congruence $x^2\equiv d\pmod{p}$, even for very large $p$. For details, you may want to look at the Wikipedia article on the Tonelli-Shanks algorithm.
Remark: We multiplied through by $4$ to prepare for the generalization. However, in our case we can complete the square somewhat more simply, by replacing $7$ by $50$. Then note that $n^2+50n-2=(n+25)^2-627$, and we can replace $627$ by $25$, making the solutions obvious. 
A: Hint I  Make the polynomial a sum of a square and another number.
Hint II  What is $7/2\pmod {43}$?  

Have a look at this page if you are not yet familiar with modular arithmetic: Here we are just computing things modulo a prime, namely, if the difference of two numbers is divisible by $43$, then we deem them as equal. And this explains what we meant by the inverse of a number: if $ab$ is regarded as equal to $1$ in our new point of view, then we say that $b$ is the inverse of $a$, and denote by $a^{-1}$.  

Can you take it from here?
A: The number $43$ is a prime, thus we can work like we always do, for example, with real numbers: all the same rules apply to the integers modulo $43$. Now, we seek to complete the square. All equalities are in $\Bbb Z/43\Bbb Z$, the integers modulo $43$:
$${n^2} + 7n - 2 = 0$$
$${n^2} + 2\frac 72n - 2 = 0$$
Note that $2$ has as an inverse the number $22$ since $2\times 22=44=1 \pmod {43}$. Thus $\dfrac 7 2=7\times 2^{-1}=7\times 22=25$. Then we get 
$$\begin{align}n^2+2\cdot 25 n-2+25^2-25^2&=0\\
(n+25)^2&=25^2+2\\(n+25)^2&=25\\n+25&=\begin{cases}5\\-5\end{cases}\\n&=\begin{cases}-20=23\\-30=13\end{cases}\end{align}$$
A: They mean that the remainders of $13^2+7\cdot13-2$ and of $23^2+7\cdot23-2$ are zero after division by $43$. 
If two number $n$ and $n+43k$ differ by a multiple of $43$, then the remainders after division by $43$ of $n^2+7n-2$ and $(n+43k)^2+7(n+43k)-2$ are the same. To see this is enough to show that their difference is multiple of $43$. In fact, $\left((n+43k)^2+7(n+43k)-2\right)-\left(n^2+7n-2\right)=2\cdot43nk+43^2k^2+7\cdot43k$, which is multiple of $43$.
This means that to find them it is enough to test the remainders of $n^2+7n-2$ evaluated at each $n=0,1,\ldots,42$, in the division by $43$. The analogous is true in general for any polynomial modulo any number $p$. It is enough to search the zeros among $0,1,\ldots,p-1$.
