Divide years by 5

For discussing Olympiad Level Number Theory problems
User avatar
samiul_samin
Posts: 999
Joined: Sat Dec 09, 2017 1:32 pm

Divide years by 5

Unread post by samiul_samin » Fri Jan 18, 2019 6:58 pm

$S=2018^{2019}-2019^{2018}$
What is the remainder if we divide $S$ by $5$?

User avatar
samiul_samin
Posts: 999
Joined: Sat Dec 09, 2017 1:32 pm

Re: Divide years by 5

Unread post by samiul_samin » Fri Jan 18, 2019 7:15 pm

Hint
Modular Arithmatic
Python Code

Code: Select all

(2018**2019-2019**2018)%5
Python 3.7
Answer
$\fbox 1$
Solution
$2018^2\equiv-1(mod 5)$
:arrow: $2018^{2018}\equiv-1(mod 5)$
:arrow: $2018^{2019}\equiv-3\equiv2(mod 5)$...(1)

$2019^2\equiv1(mod 5)$
:arrow: $2019^{2018}\equiv1(mod 5)$ ...(2)

:arrow: $2018^{2019}-2019^{2018}\equiv1(mod 5)$...(1)-(2)




Source
BdMO $2019$ Selection Round Mymensingh Higher Secondary Problem no $3$

User avatar
Safwan
Posts: 17
Joined: Tue Jan 15, 2019 8:50 pm
Location: BAU,Mymensingh,Bangladesh

Re: Divide years by 5

Unread post by Safwan » Wed Jan 23, 2019 2:37 pm

this one was easy.simple with mod.

User avatar
samiul_samin
Posts: 999
Joined: Sat Dec 09, 2017 1:32 pm

Re: Divide years by 5

Unread post by samiul_samin » Wed Jan 23, 2019 4:28 pm

Safwan wrote:
Wed Jan 23, 2019 2:37 pm
this one was easy.simple with mod.
But it was impossible for those who dosen't know Modular arithmatic! :geek: :geek: :geek:

Post Reply