divisibility - math.tamu.eduzelenko/seemath.pdf · problem 3 in some kingdom there was a jail...

36
Divisibility Igor Zelenko SEE Math, August 13-14, 2012

Upload: others

Post on 14-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility

Igor Zelenko

SEE Math,

August 13-14, 2012

Page 2: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Before getting started

Below is the list of problems and games I prepared for our activity.We will certainly solve/discuss/play only part of them and maybein different order. It is recommended to continue to work at homeon the problem we will not have time to discuss today.

Page 3: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem 1

In one kingdom there are only two kinds of coins: a coin of 9 centsand a coin of 15 cents. Can we get 70 cents using these coins?

Page 4: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem 1

In one kingdom there are only two kinds of coins: a coin of 9 centsand a coin of 15 cents. Can we get 70 cents using these coins?

Page 5: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Remark

In general, given integer numbers a, b, and c , if the equation

ax + by = c

has an integer solutions x and y , then c must be divisible by thegreatest common divisor (gcd) of a and b.

Moreover (for further thinking), if c is divisible by gcd (a,b) thenthe equation ax + by = c has integer solutions (in fact infinitelymany). The latter is based on the so-called Euclid’s algorithm forfinding gcd.

Page 6: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Remark

In general, given integer numbers a, b, and c , if the equation

ax + by = c

has an integer solutions x and y , then c must be divisible by thegreatest common divisor (gcd) of a and b.

Moreover (for further thinking), if c is divisible by gcd (a,b) thenthe equation ax + by = c has integer solutions (in fact infinitelymany). The latter is based on the so-called Euclid’s algorithm forfinding gcd.

Page 7: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem for home

Three piles of stones contain 51, 49 and 5 stones respectively. It isallowed to unify any two piles to one pile and to divide a pilecontaining an even number of stones into two piles with the equalnumber of stones. Is it possible to get in this way 105 piles of onestone.

Page 8: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem 2

(a) Show that a square of a natural number has an odd numberof divisors.

(b) Is the converse statement true, i.e., if a number has an oddnumber of divisors, then is it a perfect square?

Page 9: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem 2

(a) Show that a square of a natural number has an odd numberof divisors.

(b) Is the converse statement true, i.e., if a number has an oddnumber of divisors, then is it a perfect square?

Page 10: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem 2

(a) Show that a square of a natural number has an odd numberof divisors.

(b) Is the converse statement true,

i.e., if a number has an oddnumber of divisors, then is it a perfect square?

Page 11: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem 2

(a) Show that a square of a natural number has an odd numberof divisors.

(b) Is the converse statement true, i.e., if a number has an oddnumber of divisors, then is it a perfect square?

Page 12: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem 3In some kingdom there was a jail with 100 cells, enumerated from1 to 100. In each cell there was one prisoner. The locks in the cellswere arrange such that the locked door becomes unlocked afterone turn of the key clockwise and the unlocked door becamelocked after one turn of the key clockwise.

The king was in a battle against one of his neighbor and at somemoment he thought he is going to win. Being exited, he sent amessenger with an order to unlock all cells in the prison. However,the situation in the battlefield has changed quickly and the kingsent another messenger (in pursuit of the first one) with the orderto turn a key clockwise in each second cell. Then the situation inthe battlefield improved and he sent the third messenger with anorder to turn a key clockwise in each third cell and so on.In this way 100 messengers arrived to the jail almostsimultaneously and turned successively the keys according to theking orders. After this procedure, how many prisoners were freeand from what cells are they?

Page 13: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem 3In some kingdom there was a jail with 100 cells, enumerated from1 to 100. In each cell there was one prisoner. The locks in the cellswere arrange such that the locked door becomes unlocked afterone turn of the key clockwise and the unlocked door becamelocked after one turn of the key clockwise.The king was in a battle against one of his neighbor and at somemoment he thought he is going to win. Being exited, he sent amessenger with an order to unlock all cells in the prison. However,the situation in the battlefield has changed quickly and the kingsent another messenger (in pursuit of the first one) with the orderto turn a key clockwise in each second cell. Then the situation inthe battlefield improved and he sent the third messenger with anorder to turn a key clockwise in each third cell and so on.

In this way 100 messengers arrived to the jail almostsimultaneously and turned successively the keys according to theking orders. After this procedure, how many prisoners were freeand from what cells are they?

Page 14: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Problem 3In some kingdom there was a jail with 100 cells, enumerated from1 to 100. In each cell there was one prisoner. The locks in the cellswere arrange such that the locked door becomes unlocked afterone turn of the key clockwise and the unlocked door becamelocked after one turn of the key clockwise.The king was in a battle against one of his neighbor and at somemoment he thought he is going to win. Being exited, he sent amessenger with an order to unlock all cells in the prison. However,the situation in the battlefield has changed quickly and the kingsent another messenger (in pursuit of the first one) with the orderto turn a key clockwise in each second cell. Then the situation inthe battlefield improved and he sent the third messenger with anorder to turn a key clockwise in each third cell and so on.In this way 100 messengers arrived to the jail almostsimultaneously and turned successively the keys according to theking orders. After this procedure, how many prisoners were freeand from what cells are they?

Page 15: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 9 test, Problem 4

(a) Show that the difference of a natural number and the sum ofits digit is divisible by 9.

(b) Deduce from here the following generalization of thedivisibility by 9 test: the remainders after division by 9 of anumber and the sum of its digits are equal.

In particular, this implies the very well know divisibility by 9test: the number (an−1an−2 . . . a1a0)10 is divisible by 9 if andonly of a0 + a1 + . . . + an−1 is divisible by 9.

Page 16: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 9 test, Problem 4

(a) Show that the difference of a natural number and the sum ofits digit is divisible by 9.

(b) Deduce from here the following generalization of thedivisibility by 9 test: the remainders after division by 9 of anumber and the sum of its digits are equal.

In particular, this implies the very well know divisibility by 9test: the number (an−1an−2 . . . a1a0)10 is divisible by 9 if andonly of a0 + a1 + . . . + an−1 is divisible by 9.

Page 17: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 9 test, Problem 4

(a) Show that the difference of a natural number and the sum ofits digit is divisible by 9.

(b) Deduce from here the following generalization of thedivisibility by 9 test: the remainders after division by 9 of anumber and the sum of its digits are equal.

In particular, this implies the very well know divisibility by 9test: the number (an−1an−2 . . . a1a0)10 is divisible by 9 if andonly of a0 + a1 + . . . + an−1 is divisible by 9.

Page 18: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 9 test, Problem 4

(a) Show that the difference of a natural number and the sum ofits digit is divisible by 9.

(b) Deduce from here the following generalization of thedivisibility by 9 test: the remainders after division by 9 of anumber and the sum of its digits are equal.

In particular, this implies the very well know divisibility by 9test: the number (an−1an−2 . . . a1a0)10 is divisible by 9 if andonly of a0 + a1 + . . . + an−1 is divisible by 9.

Page 19: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Applications of divisibility by 9 test: Problem 5

John found the number

100! = 1 · 2 · . . . 100.

Then he sum up all digits of this number, then he sum up alldigits in this new number and so on till he got a one-digit number.What is this number?

Page 20: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Applications of divisibility by 9 test: Problem 6

After changing the order of digits in some number one gets anumber that is three times bigger than the original one. Prove thatthe resulting number is a multiple of 27.

Page 21: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Application of divisibility by 9 test: Problem 7

Find the minimal natural number containing only digits 1 and 0 (inits decimal form) which is divided by 225.

Page 22: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 11 tests: Problem 8

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 11if and only of a0 − a1 + a2 − a3 . . . + (−1)n−1an−1 is divisibleby 11

or, equivalently, the difference of the sum of all odddigits and the sum of all even digits is divisible by 11.

(b) Using this test, check whether 82918 is divisible by 11.

Page 23: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 11 tests: Problem 8

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 11if and only of a0 − a1 + a2 − a3 . . . + (−1)n−1an−1 is divisibleby 11 or, equivalently, the difference of the sum of all odddigits and the sum of all even digits is divisible by 11.

(b) Using this test, check whether 82918 is divisible by 11.

Page 24: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 11 tests: Problem 8

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 11if and only of a0 − a1 + a2 − a3 . . . + (−1)n−1an−1 is divisibleby 11 or, equivalently, the difference of the sum of all odddigits and the sum of all even digits is divisible by 11.

(b) Using this test, check whether 82918 is divisible by 11.

Page 25: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 7 test: Problem 9

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 7 ifand only if the number the number (an−1an−2 . . . a1)10 + 5a0is divisible by 7.

In other words, we first take the number obtained from theoriginal one by erasing the last digit (the digit of units) andthen add to it the last digit multiplied by 5.

(b) Using this test, check whether the number 12341 is divisibleby 7.

(c) Deduce a similar test for divisibility by 49.

Page 26: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 7 test: Problem 9

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 7 ifand only if the number the number (an−1an−2 . . . a1)10 + 5a0is divisible by 7.In other words, we first take the number obtained from theoriginal one by erasing the last digit (the digit of units) andthen add to it the last digit multiplied by 5.

(b) Using this test, check whether the number 12341 is divisibleby 7.

(c) Deduce a similar test for divisibility by 49.

Page 27: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 7 test: Problem 9

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 7 ifand only if the number the number (an−1an−2 . . . a1)10 + 5a0is divisible by 7.In other words, we first take the number obtained from theoriginal one by erasing the last digit (the digit of units) andthen add to it the last digit multiplied by 5.

(b) Using this test, check whether the number 12341 is divisibleby 7.

(c) Deduce a similar test for divisibility by 49.

Page 28: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 7 test: Problem 9

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 7 ifand only if the number the number (an−1an−2 . . . a1)10 + 5a0is divisible by 7.In other words, we first take the number obtained from theoriginal one by erasing the last digit (the digit of units) andthen add to it the last digit multiplied by 5.

(b) Using this test, check whether the number 12341 is divisibleby 7.

(c) Deduce a similar test for divisibility by 49.

Page 29: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 13 test: Problem 10

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 13if and only if the number the number(an−1an−2 . . . a1)10 + 4a0

In other words, we first take the number obtained from theoriginal one by erasing the last digit (the digit of units) andthen add to it the last digit multiplied by 4.

(b ) Using this test, check whether the number 10205 is divisibleby 13.

(c) Deduce a similar test for divisibility by 39.

Page 30: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 13 test: Problem 10

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 13if and only if the number the number(an−1an−2 . . . a1)10 + 4a0

In other words, we first take the number obtained from theoriginal one by erasing the last digit (the digit of units) andthen add to it the last digit multiplied by 4.

(b ) Using this test, check whether the number 10205 is divisibleby 13.

(c) Deduce a similar test for divisibility by 39.

Page 31: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 13 test: Problem 10

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 13if and only if the number the number(an−1an−2 . . . a1)10 + 4a0

In other words, we first take the number obtained from theoriginal one by erasing the last digit (the digit of units) andthen add to it the last digit multiplied by 4.

(b ) Using this test, check whether the number 10205 is divisibleby 13.

(c) Deduce a similar test for divisibility by 39.

Page 32: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Divisibility by 13 test: Problem 10

(a) Show that the number (an−1an−2 . . . a1a0)10 is divisible by 13if and only if the number the number(an−1an−2 . . . a1)10 + 4a0

In other words, we first take the number obtained from theoriginal one by erasing the last digit (the digit of units) andthen add to it the last digit multiplied by 4.

(b ) Using this test, check whether the number 10205 is divisibleby 13.

(c) Deduce a similar test for divisibility by 39.

Page 33: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

If you ambitious: Problems for home

Find similar test for divisibility by 17, 23, 27, 29, 59, 79, 89 andmore.

Page 34: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Game using divisibility

A pile contains n stones. Two players participate in the game. Ateach turn, a player may take no more than p stones from the pilebut he mus take at least one stone. The loser is the player whocannot move. Which player has the winning strategy (the answeractually depends on n and p).

Page 35: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Remainders and periodicity. Problem 11

Find the last digit of the number 777777

Page 36: Divisibility - math.tamu.eduzelenko/seemath.pdf · Problem 3 In some kingdom there was a jail with100cells, enumerated from 1to100. In each cell there was one prisoner. The locks

Remainders and periodicity. Problem 12

Find the remainder when the number 32011 is divided by 7.