< High School Mathematics Extensions < Primes
HSME
Content
Primes
Modular Arithmetic
Problems & Projects
Problem Set
Project
Solutions
Exercise Solutions
Problem Set Solutions
Misc.
Definition Sheet
Full Version
PDF Version

HSE Primes|Primes and Modular Arithmetic

At the moment, the main focus is on authoring the main content of each chapter. Therefore this exercise solutions section may be out of date and appear disorganised.

If you have a question please leave a comment in the "discussion section" or contact the author or any of the major contributors.

Factorisation Exercises

Factorise the following numbers. (note: I know you didn't have to, this is just for those who are curious)

  1. 13 is prime
  2. 59 is prime
  3. 101 is prime

Recursive Factorisation Exercises

Factorise using recursion.

Prime Sieve Exercises

  1. Use the above result to quickly work out the numbers that still need to be crossed out in the table below, knowing 5 is the next prime:
The next prime number is 5. Because 5 is an unmarked prime number, and 5 * 5 = 25, cross out 25. Also, 7 is an unmarked prime number, and 5 * 7 = 35, so cross off 35. However, 5 * 11 = 55, which is too high, so mark 5 as prime ad move on to 7. The only number low enough to be marked off is 7 * 7, which equals 49. You can go no higher.

2. Find all primes below 200.

The method will not be outlined here, as it is too long. However, all primes below 200 are:

2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199

Modular Arithmetic Exercises

  1. alternatively, -1 = 10, -5 = 6: 10 × 6 = 60 = 5&times 11 + 5 = 5



  2. An easier list: 2, 4, 8, 5, 10, 9, 7, 3, 6, 1
    Notice that it is not necessary to actually
    compute to find mod 11.
    If you know mod 11 = 6.
    You can find mod 11 = (2*( mod 11)) mod 11 = 2*6 mod 11 = 12 mod 11 = 1.
    We can note that 29 = 6 and 210 = 1, we can calculate 62 easily: 62 = 218 = 2^8 = 3. OR by the above method



    An easier list: 6, 3, 7, 9, 10, 5, 8, 4, 2, 1.
  3. 02 = 0, 12 = 1, 22 = 4, 32 = 9,
    42 = 16 = 5, 52 = 25 = 5, 62 = 36 = 3, 72 = 49 = 3,
    82 = 64 = 9, 92 = 81 = 4, 102 = 100 = 1
    An easier list: 0, 1, 4, 9, 5, 3, 3, 5, 9, 4, 1
    Thus
  4. x2 = -2 = 9
    Just look at the list above and you'll see that

Division and Inverses Exercises

1.

therefore the inverse does not exist

2.

3.

4.

01234567 891011121314151617 18
1 mod 2
12 mod 3
13 mod 4
1324 mod 5
15 mod 6
145236 mod 7
135 7 mod 8
15 7 2 4 8 mod 9
17 3 9 mod 10
16439287510 mod 11
15 7 11 mod 12
179108112 534612 mod 13
153 119 13 mod 14
18 4 132 11 714 mod 15
11113 7 93 5 15 mod 16
19613735 152121410411816 mod 17
111 13 5 7 17 mod 18
11013541611 12172783151469 18mod 19

Coprime and greatest common divisor Exercises

1.

1.
smaller larger
50505051
15050
01
5050 and 5051 are coprime
2.
smaller larger
5978
1959
219
12
01
59 and 79 are coprime
3.
smaller larger
111369
36111
336
03
111 and 369 are not coprime
4.
smaller larger
20214032
20112021
102011
110
01
2021 and 4032 are coprime

2. We first calculate the gcd for all combinations

smaller larger
15510
015
smaller larger
15375
015
smaller larger
375510
135375
105135
30105
1530
015
The gcd for any combination of the numbers is 15 so the gcd is 15 for the three numbers.

Diophantine equation Exercises

1.

There is no solution, because can never become an integer.

2.

We choose d=1, then x=26.

3.

(a)
smaller larger PQ
33101 3
233 16
12 2
01
3 16 2
0 1 3 49 101
1 0 1 16 33
(b) To be added

4.

(a)
smaller larger PQ
17317 18
1117 1
611 1
56 1
15 5
01
18 1 1 1 5
0 1 18 19 37 56 317
1 0 1 1 2 3 17
(b) To be added

Chinese remainder theorem exercises

1.

Question 1

Show that the divisible-by-3 theorem works for any 3 digits numbers (Hint: Express a 3 digit number as 100a + 10b + c, where a, b and c are ≥ 0 and < 10)

Solution 1 Any 3 digits integer x can be expressed as follows

x = 100a + 10b + c

where a, b and c are positive integer between 0 and 9 inclusive. Now

if and only if a + b + c = 3k for some k. But a, b and c are the digits of x.

Question 2

"A number is divisible by 9 if and only if the sum of its digits is divisible by 9." True or false? Determine whether 89, 558, 51858, and 41857 are divisible by 9. Check your answers.

Solution 2 The statement is true and can be proven as in question 1.

Question 4

The prime sieve has been applied to the table of numbers above. Notice that every number situated directly below 2 and 5 are crossed out. Construct a rectangular grid of numbers running from 1 to 60 so that after the prime sieve has been performed on it, all numbers situated directly below 3 and 5 are crossed out. What is the width of the grid?

Solution 4 The width of the grid should be 15 or a multiple of it.

Question 6

Show that n - 1 has itself as an inverse modulo n.

Solution 6

(n - 1)2 = n2 - 2n + 1 = 1 (mod n)

Alternatively

(n - 1)2 = (-1)2 = 1 (mod n)

Question 7

Show that 10 does not have an inverse modulo 15.

Solution 7 Suppose 10 does have an inverse x mod 15,

10x = 1 (mod 15)
2×5x = 1 (mod 15)
5x = 8 (mod 15)
5x = 8 + 15k

for some integer k

x = 1.6 + 3k

but now x is not an integer, therefore 10 does not have an inverse

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.