1.2 Practice

1

Question

By using the Euclidean algorithm, find the GCD of the following:

  1. 7469 & 2464
  2. 2689 & 4001
  3. 2947 & 3997
  4. 1109 & 4999

Proof
(1):

7469=24643+772464=7732+0

So gcd(7469,2464)=77

4001=26891+13122689=13122+651312=6520+1265=125+512=52+25=22+12=12+0

So gcd(4001,2464)=1.

3997=29471+10502947=10502+8471050=8471+203847=2034+35203=355+2835=281+728=74+0

So gcd(3997,2947)=7.

4999=11094+5631109=5631+546563=5461+17546=1732+217=28+12=12+0

So gcd(4999,1109)=1.

2

Question

Find gcd(1819,3587)=g then find integers x,y that satisfy:

1819x+3587y=g

Proof
For finding gcd:

3587=18191+17681819=17681+511768=5134+3451=341+1734=172+0

So gcd(1819,3587)=17. Solving where b=1819,c=3587:

1819x+3587y=171768=c1b51=b1(cb)=2bc34=176834(51)=cb34(2bc)=69b+35c17=511(34)=2bc1(69b+35c)=71b36c

Therefore comparing the two:

17=1819(71x0)+3587(36y0)

3

Question

Find x,y to satisfy:

  1. 423x+198y=9
  2. 71x50y=1
  3. 43x+64y=1
  4. 93x81y=3
  5. 6x+10y+15z=1

Proof
(1):
gcd(423,198)=?

423=1982+27198=277+927=93+0

So gcd(423,198)=9. Further:

27=4232(198)=a2b9=1987(27)=b7(a2b)=15b7a=7a+15b

So:

9=423(7)+198(15)

(2):

gcd(71,50)=?71=501+2150=212+821=82+58=51+35=31+23=21+12=12

Thus gcd(71,50)=1. Further:

21=7150=ab8=50212=b2(ab)=2a+3b5=2182=(ab)2(2a+3b)=5a7b3=85=(2a+3b)(5a7b)=7a+10b2=53=(5a7b)(7a+10b)=12a17b1=32=(7a+10b)(12a17b)=19a+27b

Therefore:

1=71x50y=71(19)50(27)

Here we have x=19,y=27.

(3):
gcd(43,64)=?:

64=431+2143=212+121=121

So gcd(43,64)=1:

21=ba1=43221=a2(ba)=3a2b

Therefore:

1=43x+64y=43(3)+64(2)

Here x=3,y=2.

(4):
gcd(93,81)=?:

93=811+1281=126+912=91+39=33

gcd(93,81)=3. But also:

12=ab9=b6(ab)=6a+7b3=(ab)(6a+7b)=7a8b

Thus:

3=93x81y=93(7)81(8)

Here x=7,y=8.

(5):
Go one pair of gcd terms at a time.

gcd(6,10)=?10=61+46=41+24=22

Thus gcd(6,10)=2 and:

4=106=ba,2=64=a(ba)=2ab

Now:

gcd(gcd(6,10),15)=gcd(2,15)=?15=27+12=12

Thus gcd(6,10,15)=1 but more importantly:

1=1572=c7(2ab)=14a+7b+c

Thus:

1=6x+10y+15z=6(14)+10(7)+15(1)

Here x=14,y=7,b=1.

4

Question

Find the lcm(482,1687) and lcm(60,61).

Proof
For each lcm we can do the following:

[a,b]=|ab|gcd(a,b)

(1):

gcd(482,1687)=?1687=4823+241482=2412

So gcd(482,1687)=241 in fact if we notice further we have:

gcd(482,1687)=gcd(2412,2417)=241gcd(2,7)=241

Therefore then:

lcm(482,1687)=272412241=14241=3374

(2):

gcd(60,61)=?

They are 1 apart, so they can't share any common factors, so gcd(60,61)=1. Therefore:

lcm(60,61)=|ab|=3660

5

Question

How many integers between 100 and 1000 are divisible by 7?

Proof
All we have to do is make an arithmetic progression by starting at the lowest number above 100 that's divisible by 7, and end before 1000 in a similar manner. Notice that:

1002mod7

Since 100=714+2. Therefore, start at 102 in the AP:

a1=102

Every 7 integers we move we get a new divisible by 7 number:

a2=109,...,an=102+7(n1)

We want to know when:

an=102+7(n1)10007(n1)898n1128+27

Thus since n is an integer:

1n129

Thus n takes on 129 values, so clearly we have that many integers divisible by 7 in that range.

6

Question

Prove that the product of 3 consecutive integers is divisible by 6; of four consecutive integers by 24

Proof
To prove 6|n(n+1)(n+2) for all n, we have the following cases:

Therefore clearly 2|n(n+1)(n+2). By a similar argument we have the following cases:

We can extend the fact that 24|n(n+1)(n+2)(n+3) by considering the cases:

7

Question

Exhibit three integers that are relatively prime but not relatively prime in pairs

Proof
We can't just choose 3 numbers that are all consecutive because of the second condition. What would help is to just take the prime numbers:

2,3,5,7,11,...

and take groups of factors for the different numbers. For example:

a1=25=10,a2=37=21,a3=11

But this doesn't work since we need to have them be non-relatively prime in pairs. What would help is to instead choose shared factors; one between a1,a2, another between a2,a3, and another for a3,a1. For example:

a1=25,a2=23,a3=35

Here we have A={10,6,15}. All are relatively prime (not one prime factor exists between all of them); however, we do have it that a1,a2 share a factor of 2, and a2,a3 share a factor of 3, and a1,a3 share the factor of 5.

9

Question

Show that if ac|bc then a|b.

Proof
Suppose ac|bc, so then qZ where ac(q)=bc. Notice then that:

acq=bcc(aqb)=0

Now if c=0 then that would be an undefined case since then 0|0, so we have to assume c0. Therefore aqb=0b=aq, so then a|b as expected.

11

Question

Prove that 4(n2+2) for all nZ.

Proof
Proof by induction, since clearly the case for n will apply the same for n since n2=(n)2.

For n=0 notice that 402+242 as expected. Now suppose that 4(n2+2) for all n. We'll prove the n+1 case, namely:

4((n+1)2+2)4(n2+2n+3)4([n2+2]+[2n+1])4n2+242n+142n+1(Inductive Hypothesis)

So notice that we must show that 42n+1, but this is easy. Assume for contradiction that instead 4|2n+1 so then 4k=2n+1. But then 1=4k2n=2(2kn). But 1 doesn't have a factor of 2! Therefore this is a contradiction, so then 42n+1.

13

Question

Prove that:

  • n2n is divisible by 2 for every integer n
  • n3n is divisible by 6
  • n5n is divisible by 30

Proof
(1): Notice that n2n=n(n1). Now if n is even then clearly 2|n(n1) and if n is odd then n1 is even so 2|n1 so then 2|n(n1).

(2): Notice that 2|n2n so then since n3n=n(n21)=n(n1)(n+1) which is divisible by 6 via 1.2 Practice#6.

(3): Notice that:

n5n=n(n41)=n(n2+1)(n21)=n(n2+1)(n1)(n+1)

So then clearly via (2) then we have 6|n5n. We just need to then show that 5|n5n. Notice:

15

Question

Prove that if x,y both are odd, then x2+y2 is even but not divisible by 4.

Proof
Say x,y are odd. Then x=2n+1 and y=2m+1 for n,mZ. Then:

x2+y2=(2n+1)2+(2m+1)2=4n2+4n+1+4m2+4m+1=4(n2+m2+n+m)+2

Notice that n2+m2+n+m is an integer so then x2+y2=4k+2. By the division algorithm then x2+y2 divided by 4 always gives r=2 so then clearly 4x2+y2.

To show that x2+y2 is even, notice:

x2+y2=4k+2=2(2k+1)

So then 2|x2+y2.

17

Question

Evaluate gcd(n,n+1),lcm(n,n+1) where n is a positive integer.

Proof
Notice that using Euclid's Algorithm:

n+1=n1+1n=1n

So then it terminates where 1=gcd(n,n+1). Furthermore:

lcm(n,n+1)=n(n+1)gcd(n,n+1)=n2+n

19

Question

Prove that any set of integers that are relatively prime in pairs are relatively prime.

Proof
Let S={ai:iNi(gcd(ai,ai+1)=1} be arbitrary, where each aiZ. We'll show that for all i,j that gcd(ai,aj)=1.

Consider the sequence of integers of ai,...,aj. Namely:

ai,...,aj

Now let's induct over the difference ji. If ji=1, then we have:

ai,ai+1

where i+1=j. By definition of the set S then gcd(ai,ai+1)=1 as required.

Now consider for some n that if we have ji=n then gcd(ai,aj)=1 via the inductive hypothesis. We'll show that gcd(ai,aj+1)=1 and then we are done. Notice that:

gcd(ai,aj+1)=gcd(ai,gcd(aj,aj+1))=gcd(gcd(ai,aj),aj+1)

But via the inductive hypothesis then gcd(ai,aj)=1, so then:

=gcd(1,aj+1)=1

Completing the induction.

21

Question

Prove that if an integer is of the form 6k+5, then it is necessarily of the form 3k1, but not conversely.

Proof
We'll show () first. Suppose n=6k+5. We'll show that it is of the form 3k1. Notice that:

n=6k+5=6(k+1)1=23(k+1)1=3(2k+2)1

Choose k=2k+2. Then clearly n=3k1 as expected.

Now () via the following counter-example. Namely, if we have k=1 then:

n=311=2

Now if we assume for contradiction that 2=6k+5 is a valid form then:

3=6k1=2k

Which is impossible. Thus 26k+5.

23

Question

Prove that the square of any integer is of the form 3k or 3k+1 but not 3k+2.

Proof
Let nZ be arbitrary. Notice that n2=(n)2 so we can restrict nN specifically.

Notice by the Division Algorithm that since n2 is an integer, then 3k,3k+1,3k+2 are the only possible forms. So, we only have to show that 3k+2 is impossible.

Assume for contradiction that 3k+2 was indeed possible. Furthermore, since n is an integer we have the following cases:

25

Question

Prove that there are infinitely many pairs of integers x,y satisfying x+y=100 and gcd(x,y)=5.

Proof
Let xZ be arbitrary. Then choose y=100x to fit with our first equation. We'll show that gcd(x,y)=5. Using Property 4 of our gcd equivalences:

gcd(x,y)=gcd(x,y+x)=gcd(x,100)

Now we know that 100 has 5 as a factor. Thus, we can just choose x=5k where kZ is arbitrary. Then clearly:

gcd(x,y)=gcd(5k,100)=gcd(5k,520)=5gcd(k,20)

Thus to be more specific, choose only k such that gcd(k,20)=1; in other words, choose k such that k is coprime with 20.

To ensure that there are infinitely many k to do this, just have k=3m where m is any integer. We notice that 53 and via induction over m we can see that if 53m then 53m+1 by Properties of Divisibility.

27

Question

Find positive integers a,b satisfying the equations gcd(a,b)=10 and lcm(a,b)=100 simultaneously. Find all solutions.

Proof
Notice that:

|ab|=gcd(a,b)lcm(a,b)

So here:

|ab|=10100=1000=2353

Let aZ be arbitrary. Then clearly b must just be all the factors that a misses; namely it must be all the divisors of 1000. We can go through them all:

d{1,2,4,8,5,10,20,40,25,50,100,200,125,250,500,1000}

Thus then the solutions are all (a,b) such that a is the missing divisor d from the set from whatever b is. In this case:

a b
1 1000
2 500
4 250
8 125
5 200
10 100
20 50
40 25
Here we can flip a,b on the table to get the rest of the solutions. Namely, there are 16 ordered pairs of solutions!

29

Question

Let g,l be given positive integers. Prove that integers x,y exist satisfying gcd(x,y)=g and lcm(x,y)=l iff g|l.

Proof
Always g,l where g=gcd(x,y) and l=lcm(x,y) for any x,y. Now notice that if we have that then:

gcd(x,y)lcm(x,y)=|xy|=gl

To show () suppose that g|l. Then l=gk where kZ+ (has to be positive in these cases). Then:

|xy|=g(gk)=g2k

Thus then just choose x=g and y=gk to complete the equation.

To show (), suppose x,y where |xy|=gl. We'll show that g|l. Namely, notice that since g=gcd(x,y) then x=gkx and y=gky by having g as a divisor, for some kx,kyZ+. Then:

|xy|=gkxgky=g2kxky=gl

But since g>0 then g0 so then clearly:

gkxky=l

Thus by definition since kxky is an integer, then g|l as required.

31

Question

Let n2 and kZ+ both be integers. Prove that (n1)|(nk1).

Proof
Let's prove this by induction over k. For the base case when k=2 notice that:

n21=(n+1)(n1)

So since n+1 is an integer then clearly (n1)|n21 for the k=2 case.

Now suppose for induction that (n1)|(nk1) for the k-th case. We show that the k+1-th case is satisfied. Notice that:

nk+11=nk(n1)+(nk1)

Now notice that (n1)|nk(n1). Further by our inductive hypothesis then we have (n1)|(nk1). Therefore by Property 3 we have:

(n1)|[nk(n1)+(nk1)](n1)|(nk+11)

completing the inductive step.

33 (Finish, look at gcd(a,b+ax) proof)

Question

Prove that gcd(a,b)=gcd(a,b,a+b) and more generally that gcd(a,b)=gcd(a,b,ax+by).

Proof
We'll prove the latter which proves the former. Let x,yZ be arbitrary:

gcd(a,b)x0,y0(ax0+by0)

Then if d=gcd(a,b)=g:

d=ax0+by0=a(stuff)+b(stuff)+(ax+by)(stuff)

35

Question

Prove that gcd(a,a+2)=12 for every integer a.

Proof
We have two cases:

gcd(2k+1,2k+1+2)=gcd(2k+1,2k+3)=gcd(2k+1,2+(2k+1))=gcd(2k+1,2)(a=2k+1,b=2,x=1)=gcd(a,2)

But we already know a is odd, so it doesn't have a factor of 2. Thus then gcd(a,a+2)=1 in this case.

37 (try to do before 33)

Question

Prove that gcd(a1,a2,...,an)=gcd(gcd(a1,...,an1),an).

Proof
Let's first prove that gcd(a,b,c)=gcd(gcd(a,b),c), as once we have that then an induction on n will finish the proof.

Consider g=gcd(a,b,c). Then: x0,y0,z0 where:

g=ax0+by0+cz0