1

Let $z=7^{2018}-1$

Theorem. : Let $p \in \mathbb{N}$ be any prime and $a \in \mathbb{Z}$. If $p$ doesn't divide $a$, then $p$ divides $a^{p-1}-1$

$$ z=\left(7^{1009}\right)^2-1=\left(7^{1009}\right)^{3-1}-1 $$ For $p=3$ and $a=7^{1009}$ the theorem gives: $$ z \bmod 3=0 $$ Any hints on how to proceed to find $z \bmod 5$?


Note: Some kind of error occurred and the important part of the last sentence got deleted/never composed. I apologize for the ambiguity of my question in its previous form.

Andrew
  • 2,031

3 Answers3

2

We have: $$(7^2)^{1009} - 1 \pmod 5$$ $$\equiv (-1)^{1009} - 1$$ $$\equiv -2 \equiv \bbox[5px,border:2px solid black]3 \pmod 5$$

Toby Mak
  • 16,827
  • @BillDubuque Thanks! – Toby Mak Dec 15 '18 at 14:07
  • Is $a^n \equiv (a \bmod 5)^n , , (\bmod 5)$ a general rule? – Andrew Dec 15 '18 at 15:21
  • "Is an≡(amod5)n(mod5) a general rule?" Yes. Arithmetic (addition, subtraction, multiplication, and raising things to powers) distributes over modulo. (Although division requires care; and being powers absolutely does not). That's a very basic fact you should have proven for yourself long before learning FLT. – fleablood Dec 15 '18 at 17:38
1

Any hints on how to proceed to find zmod5?

Do it the EXACT same way.

$5 -1 = X$

And $2018\div X = Q$ with $R$ remaider.

So $7^{2018}-1 = (7^{Q})^X*7^R - 1 \equiv 7^R - 1 \pmod 5$.

Figuring $7^R-1$ can be done by hand as $7\equiv 2\pmod 5$ so $7^R\equiv 2^R\pmod 7$ and $R < 5$.

.....

But I do have advice: Don't to $7^{2018} - 1 = (7^{2018})^2 - 1 \equiv 1-1 \equiv 0 \pmod 3$. Do $7^{2018} -1 = (7^2)^{2018} - 1 \equiv 1^{2018} - 1\equiv 0 \pmod 3$. It'll make things easier when $2018\div (p-1)$ has a remainder (as it does with $p = 5$)

fleablood
  • 124,253
1

$7^{5-1}≡1\mod 5$$7^{2016}=(7^4)^{504} ≡1\mod 5$

$7^2=49 ≡-1\mod 5$

$7^{2}.7^{2016}=7^{2018} ≡-1\mod 5$

$2^{2018}-1≡-2\mod 5 ≡3\mod 5$

sirous
  • 10,751