19 - Prime Numbers

!Screenshot 2023-10-23 at 10.03.13 AM.png!Screenshot 2023-10-23 at 10.03.21 AM.png!Screenshot 2023-10-23 at 10.03.31 AM.png
!Screenshot 2023-10-23 at 10.03.54 AM.png
!Screenshot 2023-10-23 at 10.04.06 AM.png
!Screenshot 2023-10-23 at 10.04.28 AM.png
!Screenshot 2023-10-23 at 10.04.43 AM.png

In Class Practice

There are infinitely many prime numbers.
Let S be any finite set of prime numbers. Let

n=1+∏p∈Sp

Then n≥2 so n is divisible by some prime q. Now q∤1, so q∤(n−∏p∈S). This implies that q∉S. Therefore, S cannot be the set of all primes. Since no finite set of primes contains all primes, there must be infinitely many primes.



HW 19

Ben Finch

E 19.1
a) 27 = 33
b) 3072=210⋅3
c) 60 = 22⋅5⋅3

E 19.2
Let p be prime and let n∈N.
P(n): If p divides any product of n integers, then p divides one of those integers.
Base cases:
P(1): If p∣a then p∣a for some a∈Z.
P(2): If p∣a1a2 then p∣a1 or p∣a2 by Theorem 19.5.

Inductive step:
Assume p∣a1...ak. We aim to show that p∣a1...ak+1. We find

a1...ak+1=(a1...ak)ak+1

By assumption p∣a1...ak. So by theorem 19.5, p∣a1...ak or p∣ak+1.

Thus by mathematical induction, P(n) is true. ◻

E 19.3
Proof.
Let n>1 and n∈N. Choose d to be the smallest divisor of n greater than 1. Assume by way of contradiction that d is prime. Then by theorem 19.3 there exist integers a,b such that d=ab. Then a<d, b<d and a∣n and b∣n. Thus d is not the smallest divisor of n. Herein lies the contradiction. Hence d is prime. ◻

E 19.4
a)
Proof.
Let P(p): every prime number is congruent to either 1 or -1 modulo 3, p≠3. (3 is the exception).

Consider an arbitrary prime number p. Any integer p can be written in one of the three cases:

  1. 3k (p is a multiple of 3). If p=3k, then p is not a prime number (except for p=3), because it can be divided by 3 without remainder.
  2. 3k+1 (p leaves a remainder of 1 when divided by 3). If p=3k+1, then p is congruent to 1 modulo 3.
  3. 3k+2 (p leaves a remainder of 2 when divided by 3). This is equivalent to 3k−1 if modulated by 3. If p=3k−1, then p is congruent to −1 modulo 3.

for some integer k.

Hence, with only one exception (p=3), every prime number is congruent to either 1 or −1 modulo 3. ◻

b)
Proof.

Base Case:

When n=1, we have one number a1. Since we assume each ai≡1mod3, we know that a1≡1mod3.

Inductive Step:

Now, we assume that the proposition is true for some n=k, or in other words a1a2...ak≡1(mod3).

We want to prove that the proposition is true for n=k+1.

Consider the product of k+1 numbers, a1a2...ak+1. We know from our inductive hypothesis that the product a1a2...ak≡1mod3.

We find:

a1a2...ak⋅ak+1≡1⋅ak+1(mod3)

By the inductive assumption, we know that ak+1≡1mod3, so we can replace ak+1 with 1 in the above equation:

1⋅ak+1≡1⋅1mod3

Therefore, a1a2...ak+1≡1mod3.

Hence, by mathematical induction, the proposition is true for all n∈N. ◻

c)
Proof.
Let n∈N and n≡−1mod3. We aim to prove that n is divisible by some prime p such that p≡−1mod3. Assume by way of contradiction that n does not have some prime factor p such that p≡−1mod3. From part a, we know that every prime factor is either 1 or -1 modulo 3, or p=3. We can consider two cases for the prime factors of n.

  1. Suppose all prime factors of n are congruent to 1 modulo 3. If all prime factors are of the form 3k+1 for some integer k, then their product will also be of the form 3m+1 for some integer m, per part b. However, n≡−1mod3, which contradicts this result.

  2. Suppose one of the prime factors is p=3. Then n is a multiple of 3 or n=3. If n is a multiple of 3, then n is not prime, which is a contradiction. If n=3, then n≢−1mod3, which is a contradiction.

Thus in all cases, there is a contradiction. Hence n is divisible by some prime p such that p≡−1mod3. ◻

d)
Proof. Let S be any finite set of prime numbers. Let

n=−1+3(p1p2...pn)

Then n≥2 so n is divisible by some prime q by Theorem 19.7.
Using the division algorithm to divide n by any prime p∈S leaves a remainder of 1, so no prime in S divides n. Hence, q must be a prime that is not in S. Therefore, S cannot be the set of all primes. Since no finite set of primes consists of all the primes, there must be infinitely many primes that are congruent to −1mod3.

E 19.5
a)
Proof.
Let P(p): every prime number is congruent to either 1 or -1 modulo 4, p≠2. (2 is the exception).

Consider an arbitrary prime number p. Any integer p can be written in one of the four cases:

  1. 4k (p is a multiple of 4). If p=4k, then p is not a prime number (except for p=2), because it can be divided by 4 without remainder.
  2. 4k+1 (p leaves a remainder of 1 when divided by 4). If p=4k+1, then p is congruent to 1 modulo 4.
  3. 4k+2 (p leaves a remainder of 2 when divided by 4). If p=4k+2, then p is not a prime number because it can be divided by 2 without remainder.
  4. 4k+3 (p leaves a remainder of 3 when divided by 4). This is equivalent to 4k−1 if modulated by 4. If p=4k−1, then p is congruent to −1 modulo 4.

for some integer k.

Hence, with only one exception (p=2), every prime number is congruent to either 1 or −1 modulo 4. ◻

b)
Proof.

Base Case:

When n=1, we have one number a1. Since we assume each ai≡1mod4, we know that a1≡1mod4.

Inductive Step:

Now, we assume that the proposition is true for some n=k, or in other words a1a2...ak≡1(mod4).

We want to prove that the proposition is true for n=k+1.

Consider the product of k+1 numbers, a1a2...ak+1. We know from our inductive hypothesis that the product a1a2...ak≡1mod4.

We find:

a1a2...ak⋅ak+1≡1⋅ak+1(mod4)

By the inductive assumption, we know that ak+1≡1mod4, so we can replace ak+1 with 1 in the above equation:

1⋅ak+1≡1⋅1mod4

Therefore, a1a2...ak+1≡1mod4.

Hence, by mathematical induction, the proposition is true for all n∈N. ◻

c)
Proof.
Let n∈N and n≡−1mod4. We aim to prove that n is divisible by some prime p such that p≡−1mod4. Assume by way of contradiction that n does not have some prime factor p such that p≡−1mod4. From part a, we know that every prime factor is either 1 or -1 modulo 4, or p=2. We can consider two cases for the prime factors of n.

  1. Suppose all prime factors of n are congruent to 1 modulo 4. If all prime factors are of the form 4k+1 for some integer k, then their product will also be of the form 4m+1 for some integer m, per part b. However, n≡−1mod4, which contradicts this result.

  2. Suppose one of the prime factors is p=2. Then n is a multiple of 2 or n=2. If n is a multiple of 2, then n is not prime, which is a contradiction. If n=2, then n≢−1mod4, which is a contradiction.

Thus in all cases, there is a contradiction. Hence n is divisible by some prime p such that p≡−1mod4. ◻

d)
Proof. Let S be any finite set of prime numbers. Let

n=−1+4(p1p2...pn)

Then n≥2 so n is divisible by some prime q by Theorem 19.7.
Using the division algorithm to divide n by any prime p∈S leaves a remainder of 1, so no prime in S divides n. Hence, q must be a prime that is not in S. Therefore, S cannot be the set of all primes. Since no finite set of primes consists of all the primes, there must be infinitely many primes that are congruent to −1mod4. ◻