Sei sulla pagina 1di 4

Math Forum - Ask Dr.

Math

Page 1

Associated Topics || Dr. Math Home || Search Dr. Math

Using Modular Arithmetic to Test Divisibility of Large Numbers


Date:08/30/2008at06:32:55
From:Judy
Subject:Divisibilityofbignumbers
Provethat55^622*13^62+41^62isdivisibleby182.
Idon'tknowhowtogoaboutitatall.Ihavenoideawhereto
start.

Date:08/30/2008at13:46:43
From:DoctorGreenie
Subject:Re:Divisibilityofbignumbers
Hi,Judy
Problemslikethisareusuallysolvedusingmodulararithmetic.
In
modulararithmetic,weareonlyconcernedwiththeremainder
whena
numberisdividedbyanother.Thekeytoworkingwithmodular
arithmeticisthat,becauseweareonlyinterestedin
remainders,we
onlyneedtousetheremainders(insteadoftheactualnumbers)
inour
calculations.
Forexample,ifIwanttoknowtheremainderwhen3^175is
divided
by7,Icandothefollowing:
3/7=0remainder3
(3^2)/7=(3*3)/7=9/7=1remainder2
(3^3)/7=(3*2)/7=6/7=0remainder6
Inthatlastcalculation,Ididn'tmultiply3^2=9by3,because
Iam
onlyinterestedinremainders.Instead,Imultiplied2by3,
because2istheremainderwhen3^2=9isdividedby7.
(3^4)/7=(3*6)/7=18/7=2remainder4
(3^5)/7=(3*4)/7=12/7=1remainder5
(3^6)/7=(3*5)/7=15/7=2remainder1
Now,becauseourremainderis1atthispoint,whenwemultiply
http://mathforum.org/library/drmath/view/72316.html

3/26/2013 11:43:09 PM

Math Forum - Ask Dr. Math

Page 2
by3
again,thepatternofremainderswillstartrepeating.Sothe
remainderswegetwhendividingsuccessivepowersof3by7is
3,2,6,4,5,1
Thepatternrepeatsevery6powers.Thepowerinourproblemis
175;
175/6=29remainder1.Thatmeanstheremainderwhen3^175is
dividedby7isthesameastheremainderwhen3^1isdividedby
7;
andthatremainderis3.Sotheremainderwhen3^175isdivided
by
7is3.
Howdoweusemodulararithmeticonyourproblem?
Firstwenotethattheprimefactorizationofthedivisor,182,
is
182=2*7*13
Ifthegivennumberisdivisibleby182,thenitmustbe
divisible
by2,by7,andby13.
Wecanseethatthenumberisdivisibleby2withoutusing
modular
arithmetic.55^62isodd;2*(13^62)iseven;and41^62is
odd.The
expressionisthen(oddeven+odd),whichiseven;sothe
expressionisdivisibleby2.(Infact,weareusingmodular
arithmeticspecifically,arithmetic"mod2"whenwetalkabout
even
andoddnumbers.Butwedon'tneedtousetheformalmodular
arithmeticmethods,becauseitiseasytoworkwith"odd"and
"even"
numbers.)
Tofinishshowingthattheexpressionisdivisibleby182,we
canuse
modulararithmetictoshowthattheexpressionisdivisibleby
both7
and13.Theworkismorecomplicatedfor13thanfor7;soI'll
show
youthedetailsfor13andletyoutrytofillinthedetailsto
show
theexpressionisdivisibleby7.
SoIneedtoshowthat
55^622*13^62+41^62
isdivisibleby13.
Themiddletermhasmultiplefactorsof13,soitisclearly
divisibleby13,soIonlyneedtoshowthat
55^62+41^62
isdivisibleby13.Todothis,Ilookattheremainderswhen
successivepowersof55and41aredividedby13.Notethat
the
remainderwhen55itselfisdividedby13is3,andthe

http://mathforum.org/library/drmath/view/72316.html

3/26/2013 11:43:09 PM

Math Forum - Ask Dr. Math

Page 3
remainder
when41itselfisdividedby13is2soinfactIamgoingto
look
forthepatternsofremainderswhen3tosuccessivepowersand2
to
successivepowersaredividedby13.Usingtheprocess
demonstrated
above,Ifind...
3^1/13>remainder3
3^2/13=3*3/13>remainder9
3^3/13=3*9/13>remainder1
AHA!Ialreadyhavearemainderof1;thepatternofremainders
repeatsevery3powers.ThepowerIwantis62;62/3leaves
remainder2;sotheremainderwhen55^62isdividedby13isthe
same
astheremainderwhen3^2isdividedby13whichis9.
And...
2^1/13>remainder2
2^2/13=2*2/13>remainder4
2^3/13=2*4/13>remainder8
2^4/13=2*8/13>remainder3
2^5/13=2*3/13>remainder6
2^6/13=2*6/13>remainder12
AtthispointIcanusea"trick"ofmodulararithmetic.The
remainderatthispointwhendividedby13is12;inmodular
arithmeticIcanthinkofthisremainderas1.Inotherwords,
the
remainderis1lessthanthedivisor.Forexample,Icanthink
of
19/5ashavingremainder4(19=3*5+4)orashaving
remainder1
(19=4*5+(1)).Since2^6leavesremainder1,Iknowthat
(2^6)^2
=2^12isgoingtoleaveremainder(1)^2=1.Sothepattern
of
remainderswhensuccessivepowersof2aredividedby13repeats
every
12powers.
Again,thepowerinmyproblemis62;62/12=5remainder2;so
the
remainderwhen41^62isdividedby13isthesameasthe
remainder
when2^2isdividedby13whichis4.
Sonowtheremainderswhenthethreepartsofthegiven
expression
aredividedby13are9,0,and4;thesumofthoseremainders
is13;
and13isdivisibleby13.Sotheentireexpressionis
divisibleby
13.
Nowseeifyoucanusethesametypeofprocesstoshowthatthe
expressionisalsodivisibleby7....
Ihopethishelps.Pleasewritebackifyouhaveanyfurther
questionsaboutanyofthis.

http://mathforum.org/library/drmath/view/72316.html

3/26/2013 11:43:09 PM

Math Forum - Ask Dr. Math

Page 4
DoctorGreenie,TheMathForum
http://mathforum.org/dr.math/
Associated Topics:
College Number Theory
High School Number Theory

Search the Dr. Math Library:


Find items containing (put spaces between keywords):
Click only once for faster results: SEARCH
[ Choose "whole words" when searching for a word like age.]

all keywords, in any order


at least one,
that exact phrase
parts of words
whole words

Submit your own question to Dr. Math


[Privacy Policy] [Terms of Use]
Math Forum Home || Math Library || Quick Reference || Math Forum Search
Ask Dr. Math TM
1994-2013 The Math Forum
http://mathforum.org/dr.math/

http://mathforum.org/library/drmath/view/72316.html

3/26/2013 11:43:09 PM

Potrebbero piacerti anche