Using modular arithmetic to help calculate Greatest Common Divisors
In a recent FPM class we discussed how to determine GCD(21,270+5).
[See also my earlier post on Greatest Common Divisors]
The answer here was that 21|270+5 and so
In the Engagement Session we showed, instead, that 270≡24=16 (mod 21), which gives us
We discovered that 270≡24 (mod 21) by looking at powers of 2 mod 21, and spotting that we had a repeating pattern with period 6 , so that
[An alternative is to use 2≡−1 (mod 3), so that 270≡(−1)70=1 (mod 3), etc.] Similarly 269=(23)23≡123=1 (mod 7), which gives us
[See also my earlier post on Greatest Common Divisors]
The answer here was that 21|270+5 and so
GCD(21,270+5)=21.
We discussed various ways to prove this. Some students had shown separately that 3|270+5 and 7|270+5, from which it follows, e.g. by prime factorization (Fundamental Theorem of Arithmetic, FTA), or by more elementary means, that 21|270+5 too.In the Engagement Session we showed, instead, that 270≡24=16 (mod 21), which gives us
270+5≡16+5=21≡0 (mod 21)
and so 21|270+5.We discovered that 270≡24 (mod 21) by looking at powers of 2 mod 21, and spotting that we had a repeating pattern with period 6 , so that
270=24+66≡24 (mod 21)
We then made this slightly more formal by noting that 26=64=3×21+1, so that26≡1 (mod 21),
which explains the repeating pattern. If you want to use the other approach (divisibility by 3 and by 7), I would note that22=4≡1 (mod 3),
and23=8≡1 (mod 7).
Then 270=(22)35≡135=1 (mod 3), which gives us270+5≡1+5=6≡0 (mod 3),
and so 3|270+5 .[An alternative is to use 2≡−1 (mod 3), so that 270≡(−1)70=1 (mod 3), etc.] Similarly 269=(23)23≡123=1 (mod 7), which gives us
270+5=2×269+5≡2×1+5=7≡0 (mod 7)
and so 7|270+5 .
Comments
Post a Comment