Reaminder Problem 5

What is the remainder of 5 99 5^{99} when it is divided by 7?


The answer is 6.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

5 solutions

Raymond Lin
Jul 6, 2014

By Fermat's Little Theorem, 5 6 1 m o d 7 5^6 \equiv 1 \mod{7} , so 5 99 5 3 6 m o d 7 5^{99} \equiv 5^3 \equiv \fbox{6} \mod{7} .

yep Fermat's little theorem does it, @Raymond Lin do you attend MBHS?

Mardokay Mosazghi - 6 years, 11 months ago

Log in to reply

Yes, I do.

Raymond Lin - 6 years, 11 months ago

How have you solved after you have typed 'so'. ??

Chirayu Bhardwaj - 5 years, 2 months ago
Chew-Seong Cheong
Mar 11, 2018

5 99 ( 7 2 ) 99 (mod 7) 2 99 (mod 7) 8 33 (mod 7) ( 7 + 1 ) 33 (mod 7) 1 (mod 7) 6 (mod 7) \begin{aligned} 5^{99} & \equiv (7-2)^{99} \text{ (mod 7)} \\ & \equiv -2^{99} \text{ (mod 7)} \\ & \equiv -8^{33} \text{ (mod 7)} \\ & \equiv -(7+1)^{33} \text{ (mod 7)} \\ & \equiv -1 \text{ (mod 7)} \\ & \equiv \boxed{6} \text{ (mod 7)} \end{aligned}

Kenny Lau
Jul 9, 2014

From Fermat's Little Theorem, 5 99 m o d 7 = 5 99 m o d 6 m o d 7 = 5 ( 99 60 ) m o d 6 m o d 7 = 5 39 m o d 6 m o d 7 = 5 ( 39 36 ) m o d 6 m o d 7 = 5 3 m o d 7 = 125 m o d 7 = ( 125 70 ) m o d 7 = 55 m o d 7 = ( 55 56 ) m o d 7 = 1 m o d 7 = ( 1 + 7 ) m o d 7 = 6 \begin{array}{llr} &5^{99}&\mod7 \\=&5^{99\mod6}&\mod7 \\=&5^{(99-60)\mod6}&\mod7 \\=&5^{39\mod6}&\mod7 \\=&5^{(39-36)\mod6}&\mod7 \\=&5^3&\mod7 \\=&125&\mod7 \\=&(125-70)&\mod7 \\=&55&\mod7 \\=&(55-56)&\mod7 \\=&-1&\mod7 \\=&(-1+7)&\mod7 \\=&6 \end{array} It may be a bit long, but this is how I calculate it in my heart.

Ramiel To-ong
Jun 26, 2015

nice solution

Bill Bell
Aug 1, 2014

Calculate the first few terms and look for a pattern:

>>> [(5**n)%7 for n in range(2,20)]

[4, 6, 2, 3, 1, 5, 4, 6, 2, 3, 1, 5, 4L, 6L, 2L, 3L, 1L, 5L]

Notice that it's mod 6.

99 mod 6 is 6.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...