MATH1061/7861, Wed 26 Aug 2020
Question 1. Let n be any positive integer.
◦ Prove that 3 | n if and only if the sum of the digits of n is divisible by 3.
◦ Prove that 9 | n if and only if the sum of the digits of n is divisible by 9.
◦ Prove that 11 | n if and only if the alternating sum of the digits of n is divisible by 11.
The alternating sum of a sequence a, b, c, d, e, … is the sum (a − b + c − d + e − …).
3
2 102
G 10 7.10
37268A 3
Read mod
E l mod 3
4
3 31T 17
267
Number in base 10 n Lak Gaza go
267 2.00 16.10
represents i
96.10kt 93.103192.104 9 lo’tGo18
10
1010EllI1 mod3
mod 3 10k E l mod 3
mod 3 9kt t9 190
1010
NE 9k10kt1910490.100I9LI1 19lt l 9kt
Ty
n
n
0
3
0 Mod3 sumofdig
3 Multiples of 9
10 1 i loke l
mod 9 mod 9
11111
ji
825
i n E sum of 263
digits
Ht1 i 11 263
AA
10
5t2 o 8215 11
i
111253
Act sum 111825
1051.1 I E l
mod 9 A 3I6t2
t9it9ofnod3
Why
Owen
10.10 10 f I
C I
C l 10odd E
mod 11 mod 11
i
Hln neo Cured 11
alt sum of digits
o Conod 11
N
i
10E l mod11
Il
9h9m 9,90 in decimal IL
ao a taa asta Tmod
El mod ID Ak10kt9k 10k t ta 10 tao10
l
111 alt sum of digits Theorem A. There are infinitely many primes.
Pf
C
Consider
Suppose finitely Macy primes Pi pi Pn
I EEE Targest
M pipa put 1
for every prime pi pi tm
E
claim
Pf m I IP’Pippen CmodPi fiP tf
cmodpi
m
PROpmModpi o in p
i
i on pi leaves non zero remainder l
m
i pit m
of’qE
has a prime factorisation me
But
and none of our primes pi m
ghee
fadonaaton i me 1 Contradiction since m I I
i none of our primes appear in this
V primespi pi fm
Question 2. Use prime factorisation to determine gcd(63, −105) and lcm(63, −105). 000
LCM
gcd hear
5.5.17
315
CM ggegsoneat
Sideuote
Ood 17
wr5859
4 FITZ I I
7
4
ummm
aged
for each prime 23 7 112 2 72.13 2 7 110.130
Cfs7if27137 27 14 23.72 112.131
Question 3. Use the Euclidean algorithm to find gcd(1232, 5859).
5
1232 931
301
Mon 21
AI divisors are II
28 1
134 093 1 301 I
3530
10.21
002nd 37t
t 7 4 GCD 7 si
Observation. The Euclidean algorithm is h!
Theorem B. The Euclidean algorithm runs in logarithmic time.
i
need
steps required to compute god a b
If
want
god
Question 4. Use the Euclidean algorithm to find gcd(4131, 2431).
Aha
12k
mm
is
is
in.e2iiosa
a
ab atmost
and 2k
a b E2k9g steps
2 log maxcaibD
aE2k
2k armor
L
logza E log