1. Modulo 42

solve in Z :

2. $\displaystyle n^2 + n - 2 = (n+2)(n-1) = 0$ (not sure what the latex symbol is for equivalent)
so n=1 or -2 which is equivalent to 1 and 40 in mod 42.

3. Originally Posted by dhiab
solve in Z :
First note that may be a better way

$\displaystyle n^2+n-2=(n+2)(n-1)=0$ this gives two solutions

$\displaystyle n=1,n=-2 \equiv 40 \mod(42)$

Note now that

$\displaystyle 42=2\cdot 3 \cdot 7$

So the only zero divisors of the ring are

$\displaystyle 2\cdot 21,14\cdot 3,6 \cdot 7$

And that there is no way to choose n to get any of the above pairs.

So the above are the only two solutions

4. Originally Posted by dhiab
solve in Z :
Hi dhiab.

Unfortunately, Deadstar and TheEmptySet miss two solutions: $\displaystyle n=19,\,22.$

$\displaystyle n^2+n-1\equiv0\,\bmod42\ \implies\ 42=2\cdot3\cdot7\mid(n+2)(n-1).$

If 2, 3, 7 all divide $\displaystyle n+2$ or $\displaystyle n-1$, the solution set is $\displaystyle \{1+42k:k\in\mathbb Z\}\cup\{40+42k:k\in\mathbb Z\}.$

Otherwise …

(i) If 2, 3 divide $\displaystyle n+2$ and 7 divides $\displaystyle n-1,$ then $\displaystyle n\equiv-2\,\bmod6\equiv1\,\bmod7.$ The Chinese-remainder method (or otherwise trial and error) gives $\displaystyle n=22$ as one solution. Hence the solution set is $\displaystyle \{22+42k:k\in\mathbb Z\}.$

(ii) If 3 divides $\displaystyle n+2$ and 2, 7 divide $\displaystyle n-1,$ then $\displaystyle n\equiv-2\,\bmod3\equiv1\,\bmod14.$ In this case, $\displaystyle n=1$ but we already have this solution above.

(iii) If 2 divides $\displaystyle n+2$ and 3, 7 divide $\displaystyle n-1,$ then $\displaystyle n\equiv-2\,\bmod2\equiv1\,\bmod21,$ which gives the same solution set as in (i).

(iv) If 2, 7 divide $\displaystyle n+2$ and 3 divides $\displaystyle n-1,$ then $\displaystyle n\equiv-2\,\bmod14\equiv1\,\bmod3.$ So $\displaystyle n=40$ which we already have above.

(v) If 3, 7 divide $\displaystyle n+2$ and 2 divides $\displaystyle n-1,$ then $\displaystyle n\equiv-2\,\bmod21\equiv1\,\bmod2.$ So $\displaystyle n=19$ and we have found a new solution set.

(vi) Finally, if 7 divides $\displaystyle n+2$ and 2, 3 divide $\displaystyle n-1,$ then $\displaystyle n\equiv-2\,\bmod7\equiv1\,\bmod6,$ and again we have $\displaystyle n=19.$

Hence the complete solution set is $\displaystyle \{a+42k:k\in\mathbb Z,\,a=1,19,22,40\}.$