What's remaining?!

Find the remainder when 2 100 + 3 100 + 4 100 + 5 100 2^{100} + 3^{100} + 4^{100} + 5^{100} is divided by 7 7 .


The answer is 5.

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.

4 solutions

Chew-Seong Cheong
Sep 25, 2014

Thanks, I have just learnt Fermat's theorem on Wikipedia. Its general from states that for m n m o d ( p 1 ) m\equiv n \mod{(p-1)} then for every integer a a we have a m a n m o d p a^m\equiv a^n\mod{p} .

Therefore, for m = 100 m=100 and p = 7 p = 7 then, 100 n m o d 6 n = 4 100 \equiv n \mod {6} \Rightarrow n = 4 .

2 100 + 3 100 + 4 100 + 5 100 ( 2 4 + 3 4 + 4 4 + 5 4 ) m o d 7 \Rightarrow 2^{100} + 3^{100} + 4^{100} + 5^{100} \equiv (2^4 + 3^4 + 4^4 + 5^4) \mod {7}

( 16 + 81 + 256 + 625 ) m o d 7 \equiv (16 + 81 + 256 + 625) \mod {7}

( 2 + 4 + 4 + 2 ) m o d 7 \equiv (2 + 4 + 4 + 2) \mod {7}

5 m o d 7 \equiv \boxed{5} \mod {7}

Just to avoid confusion for anyone reading this, we are talking about Fermat's Little Theorem, not Fermat's Last Theorem.

Sophie Crane - 6 years, 8 months ago

Sorry, it should be "its generalised form".

Chew-Seong Cheong - 6 years, 8 months ago
Adarsh Kumar
Sep 20, 2014

2 5 ( m o d 7 ) 2\equiv-5(mod7) 2 100 5 100 m o d 7 ) \Longrightarrow2^{100}\equiv5^{100}mod7) S a m e t h i n g w i t h 3 a n d w e a r e d o w n t o f i n d i n g [ 2 5 100 + 2 4 100 ] ( m o d 7 ) . Same\ thing\ with\ 3\ and\ we\ are\ down\ to\ finding\ [2*5^{100}+2*4^{100}](mod7). B u t 5 2 4 ( m o d 7 ) w e h a v e t o f i n d : But\ 5^{2}\equiv4(mod7)\ \Longrightarrow\ we\ have\ to\ find: [ 2 4 50 + 2 4 100 ] ( m o d 7 ) [2*4^{50}+2*4^{100}](mod7) W h i c h i s e q u a l t o f i n d i n g : Which\ is\ equal\ to\ finding: [ 2 4 50 ( 4 50 + 1 ) ] ( m o d 7 ) . [2*4^{50}(4^{50}+1)](mod7). B u t 4 3 1 ( m o d 7 ) But\ 4^{3}\equiv1(mod7) 4 48 1 ( m o d 7 ) \Longrightarrow\ 4^{48}\equiv1(mod7) 4 50 2 ( m o d 7 ) \Longrightarrow\ 4^{50}\equiv2(mod7) P u t t i n g i n t h e v a l u e s w e g e t : Putting\ in\ the\ values\ we\ get: [ 2 2 ( 2 + 1 ) ] [2*2(2+1)] W h i c h i s c o n g r u e n t t o 5 m o d 7. Which\ is\ congruent\ to\ 5\ mod7.

rather find it using fermat's theorem!

Kartik Sharma - 6 years, 8 months ago

Log in to reply

Yeah I even used Fermat's!

Anik Mandal - 6 years, 8 months ago

Log in to reply

can you tell me how to do it with fermat theorem @Kartkn Ramu and @Anik Mandal

Mardokay Mosazghi - 6 years, 8 months ago

Log in to reply

@Mardokay Mosazghi I did it by the same way as @Chew-Seong Cheong did it!!

Anik Mandal - 6 years, 8 months ago

I can see how you could use it near the end once most of your work is done, but is there any way to do it at the beginning .

Trevor Arashiro - 6 years, 8 months ago
Razing Thunder
Jul 3, 2020
1
print((2**100 + 3**100 + 4**100 + 5**100)%7)

Fox To-ong
Jan 21, 2015

using the formula ( p + 1 )(q + 1)(r + 1 ) then (100+1)x4 = 404 divide by 7 the remainder is 5

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...