# Math Help - Modular equations

1. ## Modular equations

Hi everyone!

So, the question is, "Does the following modular equations have -7 as a solution?"

14169300 + 7x = 14(mod 31)

so first I was like hehe, this will be easy, just solve the first part, and check if it gives a remainder of 14 when divided by 31. Though, my official calculator can't handle these big numbers, so is there some other way of solving this?

Thanks to everyone who reads this !

2. ## Re: Modular equations

If a is not divisible by p then $a^{p-1}\equiv 1 \mod p$ [Fermat's little theorem]

So have a think about 14169^30.

3. ## Re: Modular equations

Hello, Nora314!

Does the following modular equation have -7 as a solution?

. . $14169^{300} + 7x \:\equiv\: 14\text{ (mod 31)}$

We note that: . $14169\:\equiv\:2\text{ (mod 31)}$

. . The equation becomes: . $2^{300} + 7x \:\equiv\:14\text{ (mod 31)}$

We further note that: . $2^5 \:=\:32 \:\equiv\:1\text{ (mod 31)}$

. . The equation becomes: . $(2^5)^{60} + 7x \:\equiv\:14\text{ (mod 31)}$

We have: . $1^{60} + 7x \:\equiv\:14\text{ (mod 31)}$

. . . . . . . . . $1 + 7x \:\equiv\:14 \text{ (mod 31)}$

. . . . . . . . . . . . $7x \:\equiv\:13\text{ (mod 31)}$

. . . . . . . . . . . . . $x \:\equiv\:24\text{ (mod 31)}$

Therefore: . $x \;=\;\{\hdots\:\text{-}69,\,\text{-}38,\, {\color{red}\text{-}7},\,24,\,55,\,86\,\hdots \}$