1.3 Divisibility and Primes

Ace your homework & exams now with Quizwiz!

Provide examples of a composite number and why?

Example 1.6 : 6=2⋅3, 9=3⋅3, and 24=2⋅12 are all composite.

What are the first 12 prime numbers?

The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 ....

What is a composite number?

A composite number is any positive integer n that can be written as the product of two integers a,b, both of which are at least 2 (and thus both of which are strictly smaller than n.)

What is a prime number?

A prime number is any positive integer with only two distinct positive factors, namely 1 and itself.

Exercise 1.5. (++)(Goldbach conjecture.) Show that every even integer greater than 2 can be written as the sum of two prime numbers. For example, we can write 8=3+5,14=11+3,24=17+7,6=3+3, ...

Claim 1.5. Let ab be a two-digit positive integer (where b is that num- ber's ones' digit and a is its tens' digit.) Show that the number abab is not prime. Proof. As noted before, examples alone aren't enough for a solution. However, if you're stuck (as many of us would be on first seeing a problem like this,) they can be useful for helping us find a place to start! So: let's create a bunch of two-digit numbers and factor them (say, via WolframAlpha.) If our claim is wrong, then maybe we'll stumble across a number whose only factors are 1 and itself. Conversely, if our claim is right, maybe we'll see a pattern we can generalize! We do this at right. As we do this, a pattern quickly emerges: it looks like all of these numbers are multiples of 101! This isn't a solution yet: we just checked six numbers out of quite a few possibilities. It does, however, tell us how to write a proper argument here: Notice that for any two-digit number ab, ab⋅101 = ab⋅100+ab = ab00+ab = abab. Therefore, any number of the form abab is a multiple of 101 and also a multiple of ab, by definition. Because ab is a two-digit number by definition, this means that abab has at least two factors other than 1. This means that abab cannot be a prime number, as claimed!

Theorem 1.1. Every positive integer can be factorized into a product of prime numbers in exactly one way, up to the ordering of those prime factors.

In other words, this theorem is saying the following: • Every positive integer can be factored into primes, as illustrated above. So, for example, we can take 60 and write it as 2⋅2⋅3⋅5. • No number can be factored into primes in two different ways, up to the ordering. That is: while you could write 60 as 5⋅2⋅3⋅2 or 5 ⋅ 3 ⋅ 2 ⋅ 2, you're never going to write a prime factorization of 60 that has a 7 as one of its prime factors, or doesn't have a 5. Proving this theorem is a bit beyond our skill set at the moment. Instead, let's mention a second useful fact about primes:

Is 1 a prime number?

Observation 1.1. : 1 is not a prime number. Proof : This is because 1's only factor is 1, and so 1 does not have two distinct positive integer factors.

What is the only even prime number?

Observation 1.2. : 2 is the only even prime number. Proof : This is because every other positive even number by definition has the form 2k, and so has at least 1,2,k,2k as its set of factors (and thus has more than 2 distinct positive factors.)

Give a rough observation regarding a positive integer its link with a prime number.

Observation 1.3. By definition, any positive integer is either a prime number, a composite number, or 1.

Claim 1.4 (Example) : Let a, b, c be three integers. If a divides b and b divides c, then a divides c.

Proof : Again, we need to work in abstract! That is: we cannot just check this for a few values and say that "well, when a = 4,b = 12,c = 36 this all works out." Instead, we must consider any three integers a, b, c, and work in general without knowing what a, b, c are. By definition, if a divides b, we can write ak = b for some integer k. Similarly, if b divides c, then we can write bl = c for some integer l. Now, take the equation ak = b, and use this to substitute in ak for b in our second equation bl = c. This gives us akl = c, i.e. a(kl) = c. Because k,l are both integers, their product is an integer; as a result, we've written a ⋅ (an integer) = c. In other words, by definition we have shown that a is a factor of c, as desired.

Theorem 1.2. There are infinitely many primes.

This proof is also a bit beyond us for now. However, if you skip ahead to the proof by contradiction section of our notes / wait a few weeks, you'll see a proof of this in our course! Prime numbers (as you'll see in Compsci 110) are incredibly useful for communicating securely. Using processes like the RSA cryptosystem, one of the first public-key cryptosystems to be developed, you can use prime numbers to communicate secretly over public channels. Prime numbers are also quite baffling objects, in that despite having studied them since at least 300 BC there are still so many things we do not know about them! Here are a few particularly outstanding problems, the solutions for which would earn you an instant Ph.D/professorship basically anywhere you like in the world:

What is a prime factorization?

A prime factorization of n is anyway to write n as a product of prime numbers.

Exercise 1.6. (++)(Twin prime conjecture.) A pair of prime numbers are called twin primes if one is exactly two larger than the other. For example, (5,7), (11,13) and (41,43) are twin primes. Show that there are infinitely many twin primes.

Claim 1.6. Let n be any positive integer greater than 1. Let k = ⌊ n⌋ √ denote the number given by rounding down n. If n does not have any of the numbers 2,3,...k as factors, then n is prime. Proof. We use the "suppose we're wrong" technique from Claim 1.3. That is: take any number n with the "no factors in the set 2,3,...k" property listed above. There are two possibilities: • n is prime. This is what we want: if this case holds, we're done! • n is not prime. We want to show that this case cannot hold; if we can do this, then we are left with only the case above, and have thus proven our claim! To do this: note that if n is not prime, then, it must have more than 2 factors. Let a be one of those positive factors that is not 1 or n; by the definition of factor, then, we can write n = ab for some positive integer b, and thus have that b is also another factor of n. Weknowthatbecause a≠n that b≠1. We also know that be- cause both a, b are factors of n, that by our "suppose we're wrong" assumption that a, b ≠ 2, 3, 4, . . . k. Therefore, by combining these √ n. But this means that ab > n ⋅ n = n. But this is impossible, as results, both a, b > k; that is, both a, b are greater than √√ ab = n. Therefore the only possibility left is that n is prime, as desired. This last claim is particularly useful! We know that by definition, a positive integer n is prime if it has exactly two positive integer factors: 1 and itself. Naively, then, to check if a number n is a prime, you might think that you would have to check all of the numbers 2,3,4,...n−1 each individually, and see if any of them divide n. However, Claim 1.6 tells us that we don't actually have to check all the √ numbers up to n−1; we only have to go up to n. This can save us a lot of time: as you'll see later in this coursebook in our runtime-analysis section / in papers like Compsci 130 and 220, a "runtime" of checking √ n cases is considerably better than a "runtime" of checking n cases! For instance, to see if n = 101 is prime, Claim 1.6 tells us that because 101 is not a multiple of 2,3,4,5,6,7,8,9 or 10, then 101 is itself a prime. (Much faster than checking all of the numbers up to 100.) We leave a few more exercises along these lines for the end of this chap- ter. For now, we turn to an extension of the ideas behind divisibility: modular arithmetic!

What are the many synonyms for "divides"?

"a is a divisor of b" "a is a factor of b" "b is a multiple of a" "b can be divided by a" a | b This all mean the same thing as "a divides b".

Given two integers a, b, we say a divides b if there is some integer k. What is the division formula?

We say that a divides b if there is some integer k such that ak = b.


Related study sets

Stereotypes, Prejudice, and Discrimination

View Set

Psychosocial Integrity Lippincott NCLEX-RN, PrepU

View Set

Understanding the Qur'an Final (Ross)

View Set

Anatomy Lecture 3: Cell Structures HW

View Set

Ch. 33: Cerebrovascular Disorders

View Set

Psychology Module 21- Biology, Cognition, and Learning

View Set

APHUG Rubenstein: Chapter 3 - Key Issue 3

View Set