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+pSp

Then n2 so n is divisible by some prime q. Now q1, so q(npS). This implies that qS. 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=2103
c) 60 = 2253

E 19.2
Let p be prime and let nN.
P(n): If p divides any product of n integers, then p divides one of those integers.
Base cases:
P(1): If pa then pa for some aZ.
P(2): If pa1a2 then pa1 or pa2 by Theorem 19.5.

Inductive step:
Assume pa1...ak. We aim to show that pa1...ak+1. We find

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

By assumption pa1...ak. So by theorem 19.5, pa1...ak or pak+1.

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

E 19.3
Proof.
Let n>1 and nN. 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 an and bn. 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, p3. (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 3k1 if modulated by 3. If p=3k1, 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 ai1mod3, we know that a11mod3.

Inductive Step:

Now, we assume that the proposition is true for some n=k, or in other words a1a2...ak1(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...ak1mod3.

We find:

a1a2...akak+11ak+1(mod3)

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

1ak+111mod3

Therefore, a1a2...ak+11mod3.

Hence, by mathematical induction, the proposition is true for all nN.

c)
Proof.
Let nN and n1mod3. We aim to prove that n is divisible by some prime p such that p1mod3. Assume by way of contradiction that n does not have some prime factor p such that p1mod3. 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, n1mod3, 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 n1mod3, which is a contradiction.

Thus in all cases, there is a contradiction. Hence n is divisible by some prime p such that p1mod3.

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

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

Then n2 so n is divisible by some prime q by Theorem 19.7.
Using the division algorithm to divide n by any prime pS 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, p2. (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 4k1 if modulated by 4. If p=4k1, 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 ai1mod4, we know that a11mod4.

Inductive Step:

Now, we assume that the proposition is true for some n=k, or in other words a1a2...ak1(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...ak1mod4.

We find:

a1a2...akak+11ak+1(mod4)

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

1ak+111mod4

Therefore, a1a2...ak+11mod4.

Hence, by mathematical induction, the proposition is true for all nN.

c)
Proof.
Let nN and n1mod4. We aim to prove that n is divisible by some prime p such that p1mod4. Assume by way of contradiction that n does not have some prime factor p such that p1mod4. 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, n1mod4, 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 n1mod4, which is a contradiction.

Thus in all cases, there is a contradiction. Hence n is divisible by some prime p such that p1mod4.

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

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

Then n2 so n is divisible by some prime q by Theorem 19.7.
Using the division algorithm to divide n by any prime pS 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.