Question Number 84782 by mr W last updated on 16/Mar/20
$${Find}\:{the}\:{last}\:{three}\:{digits}\:{of}\:\mathrm{2019}^{\mathrm{2019}} . \\ $$
Commented by jagoll last updated on 16/Mar/20
$$\mathrm{19}^{\mathrm{2019}} \:=\:\left(\mathrm{18}+\mathrm{1}\right)^{\mathrm{2019}} \\ $$$$=\:\underset{\mathrm{i}=\mathrm{1}} {\overset{\mathrm{2019}} {\sum}}\:\mathrm{C}_{\mathrm{i}} ^{\mathrm{2019}} \:\mathrm{18}^{\mathrm{2019}−\mathrm{i}} \:\mathrm{1}^{\mathrm{i}} \\ $$$$\mathrm{that}\:\mathrm{right}? \\ $$
Commented by mr W last updated on 16/Mar/20
$${what}\:{does}\:{this}\:{help}\:{for}\:{finding}\:{the} \\ $$$${last}\:{three}\:{digits}\:{of}\:\mathrm{19}^{\mathrm{2019}} ,\:{sir}? \\ $$
Commented by mr W last updated on 16/Mar/20
$${i}\:{have}\:{changed}\:{the}\:{question}\:{to}\:\mathrm{2019}^{\mathrm{2019}} , \\ $$$${such}\:{that}\:{it}\:{is}\:{a}\:{huge}\:{number}\:{which} \\ $$$${one}\:{can}'{t}\:“{calculate}''\:{with}\:{a}\:{calculator}. \\ $$
Commented by jagoll last updated on 16/Mar/20
$$\mathrm{hahaha}..\mathrm{yes}\:\mathrm{sir} \\ $$
Commented by jagoll last updated on 16/Mar/20
$$\mathrm{by}\:\mathrm{using}\:\mathrm{little}\:\mathrm{fermat}\:\mathrm{theorem}? \\ $$
Commented by mr W last updated on 16/Mar/20
$${i}\:{don}'{t}\:{know}\:{this}\:{theorem}.\:{i}\:{don}'{t}\:{know} \\ $$$${if}\:{there}\:{is}\:{a}\:{standard}\:{method}\:{to}\:{solve} \\ $$$${this}\:{kind}\:{of}\:{questions}.\:{but}\:{i}\:{think} \\ $$$${it}\:{is}\:{possible}\:{to}\:{solve}\:{them}\:{using} \\ $$$${conventional}\:{means}. \\ $$
Commented by Tony Lin last updated on 16/Mar/20
$$\mathrm{2019}^{\mathrm{2019}} \\ $$$$=\left(\mathrm{2000}+\mathrm{19}\right)^{\mathrm{2019}} \\ $$$$={C}_{\mathrm{0}} ^{\mathrm{2019}} \mathrm{19}^{\mathrm{2019}} +\left({C}_{\mathrm{1}} ^{\mathrm{2019}} \mathrm{2000}^{\mathrm{1}} ×\mathrm{19}^{\mathrm{2018}} +\centerdot\centerdot\centerdot\right) \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\uparrow \\ $$$$\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:\mathrm{10}^{\mathrm{3}} ×\centerdot\centerdot\centerdot \\ $$$$\mathrm{19}^{\mathrm{2019}} \\ $$$$=\left(\mathrm{20}−\mathrm{1}\right)^{\mathrm{2019}} \\ $$$$={C}_{\mathrm{0}} ^{\mathrm{2019}} \left(−\mathrm{1}\right)^{\mathrm{2019}} +{C}_{\mathrm{1}} ^{\mathrm{2019}} \mathrm{20}×\left(−\mathrm{1}\right)^{\mathrm{2018}} + \\ $$$${C}_{\mathrm{2}} ^{\mathrm{2019}} \mathrm{20}^{\mathrm{2}} ×\left(−\mathrm{1}\right)^{\mathrm{2017}} +{C}_{\mathrm{3}} ^{\mathrm{2019}} \mathrm{20}^{\mathrm{3}} ×\left(−\mathrm{1}\right)^{\mathrm{2016}} \\ $$$$+\centerdot\centerdot\centerdot \\ $$$$=\mathrm{10956448923979}+\mathrm{10}^{\mathrm{3}} ×\centerdot\centerdot\centerdot \\ $$$$\rightarrow{the}\:{last}\:{three}\:{digits}\:{is}\:\mathrm{979} \\ $$
Commented by mr W last updated on 16/Mar/20
$${that}'{s}\:{correct}\:{sir}!\:{it}'{s}\:{that}\:{what}\:{i}\:{meant}. \\ $$
Answered by mr W last updated on 16/Mar/20
$${here}\:{I}'{ll}\:{show}\:{you}\:{a}\:{general}\:{way}\:{I} \\ $$$${developed}\:{which}\:{always}\:{works}\:{for} \\ $$$${How}\:{to}\:{find}\:{the}\:{last}\:{three}\:{digits}\:{of} \\ $$$${a}\:{huge}\:{number}\:{like}\:\mathrm{2019}^{\mathrm{2019}} ? \\ $$$$ \\ $$$${we}\:{know} \\ $$$$\left(\mathrm{1000}{a}+{b}\right)^{{n}} =\underset{{k}=\mathrm{0}} {\overset{{n}} {\sum}}{C}_{{k}} ^{{n}} \left(\mathrm{1000}{a}\right)^{{n}−{k}} {b}^{{k}} \\ $$$$=\underset{{k}=\mathrm{0}} {\overset{{n}−\mathrm{1}} {\sum}}{C}_{{k}} ^{{n}} {a}^{{n}−{k}} {b}^{{k}} \mathrm{1000}^{{n}−{k}} +{b}^{{n}} \\ $$$${the}\:{first}\:{terms}\:\underset{{k}=\mathrm{0}} {\overset{{n}−\mathrm{1}} {\sum}}{C}_{{k}} ^{{n}} {a}^{{n}−{k}} {b}^{{k}} \mathrm{1000}^{{n}−{k}} \:{are} \\ $$$${a}\:{multiple}\:{of}\:\mathrm{1000},\:{its}\:{last}\:{three}\:{digits} \\ $$$${are}\:\mathrm{000},\:{therefore}\:{the}\:{last}\:{three}\:{digits} \\ $$$${of}\:\left(\mathrm{1000}{a}+{b}\right)^{{n}} \:{are}\:{the}\:{last}\:{three}\:{digits} \\ $$$${of}\:{b}^{{n}} .\:{let}'{s}\:{denote}\:{it}\:{as} \\ $$$$\left(\mathrm{1000}{a}+{b}\right)^{{n}} \overset{\mathrm{3}} {=}{b}^{{n}} \\ $$$${it}\:{means}\:{the}\:{last}\:{three}\:{digits}\:{from} \\ $$$$\left(\mathrm{1000}{a}+{b}\right)^{{n}} \:{are}\:{equal}\:{to}\:{the}\:{last}\:{three} \\ $$$${digits}\:{from}\:{b}^{{n}} . \\ $$$$ \\ $$$${it}'{s}\:{obvious}\:{that} \\ $$$${c}\left(\mathrm{1000}{a}+{b}\right)^{{n}} \overset{\mathrm{3}} {=}{cb}^{{n}} \\ $$$$ \\ $$$${now}\:{let}'{s}\:{look}\:{at}\:\mathrm{2019}^{\mathrm{2019}} . \\ $$$$\mathrm{2019}^{\mathrm{2019}} =\left(\mathrm{2000}+\mathrm{19}\right)^{\mathrm{2019}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{19}^{\mathrm{2019}} =\mathrm{19}^{\mathrm{3}} ×\left(\mathrm{19}^{\mathrm{4}} \right)^{\mathrm{504}} =\mathrm{19}^{\mathrm{3}} ×\left(\mathrm{130000}+\mathrm{321}\right)^{\mathrm{504}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{19}^{\mathrm{3}} ×\mathrm{321}^{\mathrm{504}} =\mathrm{19}^{\mathrm{3}} ×\left(\mathrm{103000}+\mathrm{41}\right)^{\mathrm{252}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{19}^{\mathrm{3}} ×\mathrm{41}^{\mathrm{252}} =\mathrm{19}^{\mathrm{3}} ×\left(\mathrm{2825000}+\mathrm{761}\right)^{\mathrm{63}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{19}^{\mathrm{3}} ×\mathrm{761}^{\mathrm{63}} =\mathrm{19}^{\mathrm{3}} ×\mathrm{761}×\left(\mathrm{579000}+\mathrm{121}\right)^{\mathrm{31}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{19}^{\mathrm{3}} ×\mathrm{761}×\mathrm{121}^{\mathrm{31}} =\mathrm{19}^{\mathrm{3}} ×\mathrm{761}×\mathrm{121}×\left(\mathrm{14000}+\mathrm{641}\right)^{\mathrm{15}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{19}^{\mathrm{3}} ×\mathrm{761}×\mathrm{121}×\mathrm{641}^{\mathrm{15}} =\mathrm{19}^{\mathrm{3}} ×\mathrm{761}×\mathrm{121}×\mathrm{641}×\left(\mathrm{410000}+\mathrm{881}\right)^{\mathrm{7}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{19}^{\mathrm{3}} ×\mathrm{761}×\mathrm{121}×\mathrm{641}×\mathrm{881}^{\mathrm{7}} =\mathrm{19}^{\mathrm{3}} ×\mathrm{761}×\mathrm{121}×\mathrm{641}×\mathrm{881}×\left(\mathrm{776000}+\mathrm{161}\right)^{\mathrm{3}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{19}^{\mathrm{3}} ×\mathrm{761}×\mathrm{121}×\mathrm{641}×\mathrm{881}×\mathrm{161}^{\mathrm{3}} =\mathrm{761}×\mathrm{121}×\mathrm{641}×\mathrm{881}×\left(\mathrm{3000}+\mathrm{59}\right)^{\mathrm{3}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{761}×\mathrm{121}×\mathrm{641}×\mathrm{881}×\mathrm{59}^{\mathrm{3}} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{761}×\mathrm{121}×\mathrm{641}×\mathrm{881}×\mathrm{379} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{761}×\mathrm{121}×\mathrm{641}×\mathrm{899} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{761}×\mathrm{121}×\mathrm{259} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{761}×\mathrm{339} \\ $$$$\overset{\mathrm{3}} {=}\mathrm{979} \\ $$$${i}.{e}.\:{the}\:{last}\:{three}\:{digits}\:{of}\:\mathrm{2019}^{\mathrm{2019}} \\ $$$${are}\:\mathrm{979}. \\ $$
Commented by mr W last updated on 16/Mar/20
$${an}\:{other}\:{example}: \\ $$$$\mathrm{17}^{\mathrm{1789}} =\mathrm{17}×\left(\mathrm{17}^{\mathrm{2}} \right)^{\mathrm{894}} =\mathrm{17}×\left(\mathrm{200}+\mathrm{89}\right)^{\mathrm{894}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{89}^{\mathrm{894}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{21}^{\mathrm{447}} =\mathrm{17}×\mathrm{21}×\left(\mathrm{21}^{\mathrm{2}} \right)^{\mathrm{223}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{21}×\mathrm{41}^{\mathrm{223}} =\mathrm{17}×\mathrm{21}×\mathrm{41}×\left(\mathrm{41}^{\mathrm{2}} \right)^{\mathrm{111}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{21}×\mathrm{41}×\mathrm{81}^{\mathrm{111}} =\mathrm{17}×\mathrm{21}×\mathrm{41}×\mathrm{81}×\left(\mathrm{81}^{\mathrm{2}} \right)^{\mathrm{55}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{21}×\mathrm{41}×\mathrm{81}×\mathrm{61}^{\mathrm{55}} =\mathrm{17}×\mathrm{21}×\mathrm{41}×\mathrm{81}×\mathrm{61}×\left(\mathrm{61}^{\mathrm{2}} \right)^{\mathrm{27}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{21}×\mathrm{41}×\mathrm{81}×\mathrm{61}×\mathrm{21}^{\mathrm{27}} =\mathrm{17}×\mathrm{41}×\mathrm{81}×\mathrm{61}×\left(\mathrm{21}^{\mathrm{2}} \right)^{\mathrm{14}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{41}×\mathrm{81}×\mathrm{61}×\mathrm{41}^{\mathrm{14}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{41}×\mathrm{81}×\mathrm{61}×\mathrm{81}^{\mathrm{7}} =\mathrm{17}×\mathrm{41}×\mathrm{61}×\mathrm{81}^{\mathrm{8}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{41}×\mathrm{61}×\mathrm{61}^{\mathrm{4}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{41}×\mathrm{61}×\mathrm{21}^{\mathrm{2}} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{41}×\mathrm{61}×\mathrm{41} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{17}×\mathrm{41}×\mathrm{1} \\ $$$$\overset{\mathrm{2}} {=}\mathrm{97} \\ $$$${i}.{e}.\:{the}\:{last}\:{two}\:{digits}\:{of}\:\mathrm{17}^{\mathrm{1789}} \:{are}\:\mathrm{97}. \\ $$
Commented by jagoll last updated on 16/Mar/20
$$\mathrm{amaZing} \\ $$