Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factorization Methods
Bernd Schröder
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Introduction
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Introduction
1. The prime factorization of integers has many applications.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Introduction
1. The prime factorization of integers has many applications.
2. But how do we find it?
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Introduction
1. The prime factorization of integers has many applications.
2. But how do we find it?
3. How do we find it in acceptable time?
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Introduction
1. The prime factorization of integers has many applications.
2. But how do we find it?
3. How do we find it in acceptable time?
4. Because the ability to factor numbers connects to the
ability to find large prime numbers (needed for internet
security), as well as to the ability to crack internet
encryptions (by factoring the numbers used in the code),
there is a lot of interest in this question.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Introduction
1. The prime factorization of integers has many applications.
2. But how do we find it?
3. How do we find it in acceptable time?
4. Because the ability to factor numbers connects to the
ability to find large prime numbers (needed for internet
security), as well as to the ability to crack internet
encryptions (by factoring the numbers used in the code),
there is a lot of interest in this question.
5. So, for the latest, it is best to check the current literature (if
it is accessible).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Introduction
1. The prime factorization of integers has many applications.
2. But how do we find it?
3. How do we find it in acceptable time?
4. Because the ability to factor numbers connects to the
ability to find large prime numbers (needed for internet
security), as well as to the ability to crack internet
encryptions (by factoring the numbers used in the code),
there is a lot of interest in this question.
5. So, for the latest, it is best to check the current literature (if
it is accessible).
6. This first presentation is only the introduction of a
recurrent theme.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91, 3 - 91
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91, 3 - 91, 5 - 91
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91, 3 - 91, 5 - 91, 7 | 91!
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91, 3 - 91, 5 - 91, 7 | 91!
2. So 91 = 7 · x and x = 91 7 = 13.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91, 3 - 91, 5 - 91, 7 | 91!
2. So 91 = 7 · x and x = 91 7 = 13.
3. So 91 = 7 · 13.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91, 3 - 91, 5 - 91, 7 | 91!
2. So 91 = 7 · x and x = 91 7 = 13.
3. So 91 = 7 · 13.
That does not seem so bad.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91, 3 - 91, 5 - 91, 7 | 91!
2. So 91 = 7 · x and x = 91 7 = 13.
3. So 91 = 7 · 13.
That does not seem so bad. Trying it with 53, 198, 462, 357
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91, 3 - 91, 5 - 91, 7 | 91!
2. So 91 = 7 · x and x = 91 7 = 13.
3. So 91 = 7 · 13.
That does not seem so bad. Trying it with 53, 198, 462, 357
shows that it actually is quite bad.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Factor the number 91
1. 2 - 91, 3 - 91, 5 - 91, 7 | 91!
2. So 91 = 7 · x and x = 91 7 = 13.
3. So 91 = 7 · 13.
That does not seem so bad. Trying it with 53, 198, 462, 357
shows that it actually is quite bad.
53, 198, 462, 357 = 11, 113, 111 · 4, 787.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma. Let n be an odd positive integer. There is a one-to-one
correspondence between the factorizations of n into two
positive integers and differences of two squares that equal n.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma. Let n be an odd positive integer. There is a one-to-one
correspondence between the factorizations of n into two
positive integers and differences of two squares that equal n.
Proof.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma. Let n be an odd positive integer. There is a one-to-one
correspondence between the factorizations of n into two
positive integers and differences of two squares that equal n.
Proof. To write a factorization of n as ab = n
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma. Let n be an odd positive integer. There is a one-to-one
correspondence between the factorizations of n into two
positive integers and differences of two squares that equal n.
Proof. To write a factorization of n as ab = n = t2 − s2
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma. Let n be an odd positive integer. There is a one-to-one
correspondence between the factorizations of n into two
positive integers and differences of two squares that equal n.
Proof. To write a factorization of n as ab = n = t2 − s2 , use
t = a+b a−b
2 ,s= 2 .
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma. Let n be an odd positive integer. There is a one-to-one
correspondence between the factorizations of n into two
positive integers and differences of two squares that equal n.
Proof. To write a factorization of n as ab = n = t2 − s2 , use
t = a+b a−b
2 , s = 2 . The one-to-one correspondence (injective
function) is that we consider the factorization itself as input
(a, b) and f (a, b) = (t, s)
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma. Let n be an odd positive integer. There is a one-to-one
correspondence between the factorizations of n into two
positive integers and differences of two squares that equal n.
Proof. To write a factorization of n as ab = n = t2 − s2 , use
t = a+b a−b
2 , s = 2 . The one-to-one correspondence (injective
function) is that we consider the factorization itself as input
a+b a−b
(a, b) and f (a, b) = (t, s) = 2 , 2 .
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma. Let n be an odd positive integer. There is a one-to-one
correspondence between the factorizations of n into two
positive integers and differences of two squares that equal n.
Proof. To write a factorization of n as ab = n = t2 − s2 , use
t = a+b a−b
2 , s = 2 . The one-to-one correspondence (injective
function) is that we consider the factorization itself as input
a+b a−b
(a, b) and f (a, b) = (t, s) = 2 , 2 .
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Implementation
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Implementation
√
1. Take t to be the smallest integer greater than n.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Implementation
√
1. Take t to be the smallest integer greater than n.
2. Look for perfect squares s2 in the sequence t2 − n,
(t + 1)2 − n, (t + 2)2 − n, . . ..
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Implementation
√
1. Take t to be the smallest integer greater than n.
2. Look for perfect squares s2 in the sequence t2 − n,
(t + 1)2 − n, (t + 2)2 − n, . . .. Then s2 = (t + k)2 − n
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Implementation
√
1. Take t to be the smallest integer greater than n.
2. Look for perfect squares s2 in the sequence t2 − n,
(t + 1)2 − n, (t + 2)2 − n, . . .. Then s2 = (t + k)2 − n and
n = (t + k)2 − s2 = (t + k + s)(t + k − s)
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Implementation
√
1. Take t to be the smallest integer greater than n.
2. Look for perfect squares s2 in the sequence t2 − n,
(t + 1)2 − n, (t + 2)2 − n, . . .. Then s2 = (t + k)2 − n and
n = (t + k)2 − s2 = (t + k + s)(t + k − s)
2 n−1 2
3. Because n = n+1
2 −
√ 2 we will find a number that
n
works in at most 2 − n steps.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Implementation
√
1. Take t to be the smallest integer greater than n.
2. Look for perfect squares s2 in the sequence t2 − n,
(t + 1)2 − n, (t + 2)2 − n, . . .. Then s2 = (t + k)2 − n and
n = (t + k)2 − s2 = (t + k + s)(t + k − s)
2 n−1 2
3. Because n = n+1
2 −
√ 2 we will find a number that
n
works in at most 2 − n steps.
4. But we cannot jump directly to the end
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Implementation
√
1. Take t to be the smallest integer greater than n.
2. Look for perfect squares s2 in the sequence t2 − n,
(t + 1)2 − n, (t + 2)2 − n, . . .. Then s2 = (t + k)2 − n and
n = (t + k)2 − s2 = (t + k + s)(t + k − s)
2 n−1 2
3. Because n = n+1
2 −
√ 2 we will find a number that
n
works in at most 2 − n steps.
4. But we cannot jump directly to the end, because using the
above difference only leads to the factorization n = n · 1.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Example.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Example.
I Factoring 1, 363 takes one step with this method.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Example.
I Factoring 1, 363 takes one step with this method.
I Factoring 1, 463 takes 10 steps.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Example.
I Factoring 1, 363 takes one step with this method.
I Factoring 1, 463 takes 10 steps.
I Unfortunately, for products of factors that are not
approximately equal, Fermat factorization can take a lot
longer:
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Example.
I Factoring 1, 363 takes one step with this method.
I Factoring 1, 463 takes 10 steps.
I Unfortunately, for products of factors that are not
approximately equal, Fermat factorization can take a lot
longer: 1, 461 is divisible by 3 and Fermat factorization
does not yield a factorization in 100 steps.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Example.
I Factoring 1, 363 takes one step with this method.
I Factoring 1, 463 takes 10 steps.
I Unfortunately, for products of factors that are not
approximately equal, Fermat factorization can take a lot
longer: 1, 461 is divisible by 3 and Fermat factorization
does not yield a factorization in 100 steps.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
Example.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
5
22 + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
5
22 + 1 = 232 + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
5
22 + 1 = 232 + 1 = 24 · 228 + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
25
2 + 1 = 2 + 1 = 2 · 2 + 1 = 641 − 5 228 + 1
32 4 4 28
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
25
2 + 1 = 2 + 1 = 2 · 2 + 1 = 641 − 5 228 + 1
32 4 4 28
4
= 641 · 228 − 5 · 27 + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
25
2 + 1 = 2 + 1 = 2 · 2 + 1 = 641 − 5 228 + 1
32 4
4 28
4
= 641 · 228 − 5 · 27 + 1 = 641 · 228 − (641 − 1)4 + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
25
2 + 1 = 2 + 1 = 2 · 2 + 1 = 641 − 5 228 + 1
32 44 28
4
= 641 · 228 − 5 · 27 + 1 = 641 · 228 − (641 − 1)4 + 1
= 641 · 228 − 6413 + 4 · 6412 − 6 · 641 + 4
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
25
2 + 1 = 2 + 1 = 2 · 2 + 1 = 641 − 5 228 + 1
32 4 4 28
4
= 641 · 228 − 5 · 27 + 1 = 641 · 228 − (641 − 1)4 + 1
= 641 · 228 − 6413 + 4 · 6412 − 6 · 641 + 4
5
So 641|22 + 1.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
25
2 + 1 = 2 + 1 = 2 · 2 + 1 = 641 − 5 228 + 1
32 4 4 28
4
= 641 · 228 − 5 · 27 + 1 = 641 · 228 − (641 − 1)4 + 1
= 641 · 228 − 6413 + 4 · 6412 − 6 · 641 + 4
5
So 641|22 + 1. Now do the division
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
n
Numbers of the form 22 + 1 are called Fermat numbers.
Fermat conjectured that all these numbers are prime. This
conjecture turned out to be incorrect.
5
Example. 22 + 1 = 641 · 6, 700, 417 (Euler, 1732).
Proof.
641 = 5 · 27 + 1 = 24 + 54
25
2 + 1 = 2 + 1 = 2 · 2 + 1 = 641 − 5 228 + 1
32 4 4 28
4
= 641 · 228 − 5 · 27 + 1 = 641 · 228 − (641 − 1)4 + 1
= 641 · 228 − 6413 + 4 · 6412 − 6 · 641 + 4
5
So 641|22 + 1. Now do the division
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
Example.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because 24 k + 1 = 16k + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because 24 k + 1 = 16k + 1 and
3
22 + 1 = 257, which is not divisible by 17
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because 24 k + 1 = 16k + 1 and
3
22 + 1 = 257, which is not divisible by 17 and all other
numbers of the form 16k + 1 are too large to be factors
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because 24 k + 1 = 16k + 1 and
3
22 + 1 = 257, which is not divisible by 17 and all other
numbers of the form 16k + 1 are too large to be factors, actually,
17 is, too.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because 24 k + 1 = 16k + 1 and
3
22 + 1 = 257, which is not divisible by 17 and all other
numbers of the form 16k + 1 are too large to be factors, actually,
17 is, too.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because 24 k + 1 = 16k + 1 and
3
22 + 1 = 257, which is not divisible by 17 and all other
numbers of the form 16k + 1 are too large to be factors, actually,
17 is, too.
Example.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because 24 k + 1 = 16k + 1 and
3
22 + 1 = 257, which is not divisible by 17 and all other
numbers of the form 16k + 1 are too large to be factors, actually,
17 is, too.
6
Example. 22 + 1 is not prime
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because 24 k + 1 = 16k + 1 and
3
22 + 1 = 257, which is not divisible by 17 and all other
numbers of the form 16k + 1 are too large to be factors, actually,
17 is, too.
6
Example. 22 + 1 is not prime, but it takes a while until a factor
256 · 1071 + 1 is found.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
So the next question is which Fermat numbers are prime.
Theorem (proof is later an exercise). Every prime divisor of a
n
Fermat number 22 + 1 is of the form 2n+1 k + 1
3
Example. 22 + 1 is prime, because 24 k + 1 = 16k + 1 and
3
22 + 1 = 257, which is not divisible by 17 and all other
numbers of the form 16k + 1 are too large to be factors, actually,
17 is, too.
6
Example. 22 + 1 is not prime, but it takes a while until a factor
256 · 1071 + 1 is found.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Facts About Fermat Numbers
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Facts About Fermat Numbers
1. Only the first four Fermat numbers are known to be prime:
1 2 3 4
22 + 1 = 5, 22 + 1 = 17, 22 + 1 = 257, 22 + 1 = 65, 537.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Facts About Fermat Numbers
1. Only the first four Fermat numbers are known to be prime:
1 2 3 4
22 + 1 = 5, 22 + 1 = 17, 22 + 1 = 257, 22 + 1 = 65, 537.
2. Another 243 are known to be composite.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Facts About Fermat Numbers
1. Only the first four Fermat numbers are known to be prime:
1 2 3 4
22 + 1 = 5, 22 + 1 = 17, 22 + 1 = 257, 22 + 1 = 65, 537.
2. Another 243 are known to be composite.
3. So now there also is a conjecture that only the first four
Fermat numbers are prime.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Facts About Fermat Numbers
1. Only the first four Fermat numbers are known to be prime:
1 2 3 4
22 + 1 = 5, 22 + 1 = 17, 22 + 1 = 257, 22 + 1 = 65, 537.
2. Another 243 are known to be composite.
3. So now there also is a conjecture that only the first four
Fermat numbers are prime.
4. The research in this direction certainly tests the limits of
what is possible: There are only 7 composite Fermat
numbers for which we know the complete factorization.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Facts About Fermat Numbers
1. Only the first four Fermat numbers are known to be prime:
1 2 3 4
22 + 1 = 5, 22 + 1 = 17, 22 + 1 = 257, 22 + 1 = 65, 537.
2. Another 243 are known to be composite.
3. So now there also is a conjecture that only the first four
Fermat numbers are prime.
4. The research in this direction certainly tests the limits of
what is possible: There are only 7 composite Fermat
numbers for which we know the complete factorization.
12
(Think about it: 22 + 1 = 24096 + 1 > 101365 .)
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Lemma.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2 = F2 − 2.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2 = F2 − 2.
Induction Step, n → n + 1.
F0 F1 F2 · · · Fn
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2 = F2 − 2.
Induction Step, n → n + 1.
F0 F1 F2 · · · Fn = (F0 F1 F2 · · · Fn−1 )Fn
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2 = F2 − 2.
Induction Step, n → n + 1.
F0 F1 F2 · · · Fn = (F0 F1 F2 · · · Fn−1 )Fn
= (Fn − 2)Fn
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2 = F2 − 2.
Induction Step, n → n + 1.
F0 F1 F2 · · · Fn = (F0 F1 F2 · · · Fn−1 )Fn
= (Fn − 2)Fn
n n
= 22 − 1 22 + 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2 = F2 − 2.
Induction Step, n → n + 1.
F0 F1 F2 · · · Fn = (F0 F1 F2 · · · Fn−1 )Fn
= (Fn − 2)Fn
n n
= 22 − 1 22 + 1
n n
= 22 +2 − 1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2 = F2 − 2.
Induction Step, n → n + 1.
F0 F1 F2 · · · Fn = (F0 F1 F2 · · · Fn−1 )Fn
= (Fn − 2)Fn
n n
= 22 − 1 22 + 1
n n
= 22 +2 − 1
n+1
2
= 2 +1−2
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2 = F2 − 2.
Induction Step, n → n + 1.
F0 F1 F2 · · · Fn = (F0 F1 F2 · · · Fn−1 )Fn
= (Fn − 2)Fn
n n
= 22 − 1 22 + 1
n n
= 22 +2 − 1
n+1
2
= 2 + 1 − 2 = Fn+1 − 2
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
k
Lemma. Let Fk := 22 + 1. Then for all positive integers n we
have F0 F1 F2 · · · Fn−1 = Fn − 2.
Proof. Induction on n.
Base Step, n = 2. F0 F1 = 3 · 5 = 15 = 17 − 2 = F2 − 2.
Induction Step, n → n + 1.
F0 F1 F2 · · · Fn = (F0 F1 F2 · · · Fn−1 )Fn
= (Fn − 2)Fn
n n
= 22 − 1 22 + 1
n n
= 22 +2 − 1
n+1
2
= 2 + 1 − 2 = Fn+1 − 2
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof. Without loss of generality, let m < n
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof. Without loss of generality, let m < n and suppose for a
contradiction that d|Fn and d|Fm . Then
d|Fn − F0 F1 F2 · · · Fn−1
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof. Without loss of generality, let m < n and suppose for a
contradiction that d|Fn and d|Fm . Then
d|Fn − F0 F1 F2 · · · Fn−1 = 2, a contradiction.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof. Without loss of generality, let m < n and suppose for a
contradiction that d|Fn and d|Fm . Then
d|Fn − F0 F1 F2 · · · Fn−1 = 2, a contradiction.
So now, if there were only finitely many prime numbers
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof. Without loss of generality, let m < n and suppose for a
contradiction that d|Fn and d|Fm . Then
d|Fn − F0 F1 F2 · · · Fn−1 = 2, a contradiction.
So now, if there were only finitely many prime numbers, say, N
of them
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof. Without loss of generality, let m < n and suppose for a
contradiction that d|Fn and d|Fm . Then
d|Fn − F0 F1 F2 · · · Fn−1 = 2, a contradiction.
So now, if there were only finitely many prime numbers, say, N
of them, then two of F0 , . . . , FN would not be relatively prime
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof. Without loss of generality, let m < n and suppose for a
contradiction that d|Fn and d|Fm . Then
d|Fn − F0 F1 F2 · · · Fn−1 = 2, a contradiction.
So now, if there were only finitely many prime numbers, say, N
of them, then two of F0 , . . . , FN would not be relatively prime,
because each Fk has a prime factor that does not occur in any of
the factorizations of the earlier Fermat numbers
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof. Without loss of generality, let m < n and suppose for a
contradiction that d|Fn and d|Fm . Then
d|Fn − F0 F1 F2 · · · Fn−1 = 2, a contradiction.
So now, if there were only finitely many prime numbers, say, N
of them, then two of F0 , . . . , FN would not be relatively prime,
because each Fk has a prime factor that does not occur in any of
the factorizations of the earlier Fermat numbers (and F0 itself is
prime, too).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. For distinct nonnegative integers n and m, the
Fermat numbers Fn and Fm are relatively prime. Consequently,
there must be infinitely many prime numbers.
Proof. Without loss of generality, let m < n and suppose for a
contradiction that d|Fn and d|Fm . Then
d|Fn − F0 F1 F2 · · · Fn−1 = 2, a contradiction.
So now, if there were only finitely many prime numbers, say, N
of them, then two of F0 , . . . , FN would not be relatively prime,
because each Fk has a prime factor that does not occur in any of
the factorizations of the earlier Fermat numbers (and F0 itself is
prime, too).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem (without proof).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem (without proof). A regular polygon with n sides can
be constructed with straightedge and compass iff n is the
product of a nonnegative power of 2 and a nonnegative number
of distinct Fermat primes.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Diophantine Equations
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Diophantine Equations
1. An equation is a diophantine equation if we only allow
integral solutions.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Diophantine Equations
1. An equation is a diophantine equation if we only allow
integral solutions.
2. The diophantine equation ax + by = c asks for all points on
this straight line whose coordinates are integers.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Diophantine Equations
1. An equation is a diophantine equation if we only allow
integral solutions.
2. The diophantine equation ax + by = c asks for all points on
this straight line whose coordinates are integers.
3. Technically, diophantine equations are solved any time we
convert currency (but of course rounding helps if the
equation does not work out).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Diophantine Equations
1. An equation is a diophantine equation if we only allow
integral solutions.
2. The diophantine equation ax + by = c asks for all points on
this straight line whose coordinates are integers.
3. Technically, diophantine equations are solved any time we
convert currency (but of course rounding helps if the
equation does not work out). For example, if 1000 US
Dollars buy 710 Euros (about the exchange rate as these
slides are made) and the bank only has 20 and 50 Euro
bills, how can the 710 Euros be paid out?
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Diophantine Equations
1. An equation is a diophantine equation if we only allow
integral solutions.
2. The diophantine equation ax + by = c asks for all points on
this straight line whose coordinates are integers.
3. Technically, diophantine equations are solved any time we
convert currency (but of course rounding helps if the
equation does not work out). For example, if 1000 US
Dollars buy 710 Euros (about the exchange rate as these
slides are made) and the bank only has 20 and 50 Euro
bills, how can the 710 Euros be paid out?
4. Could 715 Euros be paid out?
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.”
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution, then,
by earlier result, c is a multiple of (a, b).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution, then,
by earlier result, c is a multiple of (a, b).
“⇐.”
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution, then,
by earlier result, c is a multiple of (a, b).
“⇐.” If c = z · (a, b), find s and t so that sa + tb = (a, b)
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution, then,
by earlier result, c is a multiple of (a, b).
“⇐.” If c = z · (a, b), find s and t so that sa + tb = (a, b) and use
x := zs and y = zt.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution, then,
by earlier result, c is a multiple of (a, b).
“⇐.” If c = z · (a, b), find s and t so that sa + tb = (a, b) and use
x := zs and y = zt.
Regarding the infinitely many solutions, note that, in the real
numbers, the solutions are on the line ax + by = c, which goes
through the point (zs, zt) and which has slope − ab .
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution, then,
by earlier result, c is a multiple of (a, b).
“⇐.” If c = z · (a, b), find s and t so that sa + tb = (a, b) and use
x := zs and y = zt.
Regarding the infinitely many solutions, note that, in the real
numbers, the solutions are on the line ax + by = c, which goes
through the point (zs, zt) and which has slope − ab . So all
numbers of the form (zs + kb, zt − ka) with k ∈ Z are solutions,
too.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution, then,
by earlier result, c is a multiple of (a, b).
“⇐.” If c = z · (a, b), find s and t so that sa + tb = (a, b) and use
x := zs and y = zt.
Regarding the infinitely many solutions, note that, in the real
numbers, the solutions are on the line ax + by = c, which goes
through the point (zs, zt) and which has slope − ab . So all
numbers of the form (zs + kb, zt − ka) with k ∈ Z are solutions,
too. (Note that the geometry is not needed for this last part, but
it helps with the idea.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution, then,
by earlier result, c is a multiple of (a, b).
“⇐.” If c = z · (a, b), find s and t so that sa + tb = (a, b) and use
x := zs and y = zt.
Regarding the infinitely many solutions, note that, in the real
numbers, the solutions are on the line ax + by = c, which goes
through the point (zs, zt) and which has slope − ab . So all
numbers of the form (zs + kb, zt − ka) with k ∈ Z are solutions,
too. (Note that the geometry is not needed for this last part, but
it helps with the idea. Draw the picture, if it does not
“materialize” in your mind.)
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a, b, c be nonzero integers. The equation
ax + by = c has an integral solution (x, y) iff (a, b)|c. In this
case, the equation has infinitely many solutions.
Proof. “⇒.” When ax + by = c has an integral solution, then,
by earlier result, c is a multiple of (a, b).
“⇐.” If c = z · (a, b), find s and t so that sa + tb = (a, b) and use
x := zs and y = zt.
Regarding the infinitely many solutions, note that, in the real
numbers, the solutions are on the line ax + by = c, which goes
through the point (zs, zt) and which has slope − ab . So all
numbers of the form (zs + kb, zt − ka) with k ∈ Z are solutions,
too. (Note that the geometry is not needed for this last part, but
it helps with the idea. Draw the picture, if it does not
“materialize” in your mind.)
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof.
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an )
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
=
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
= ···
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
= · · · = s1 a1 + · · · + sn−1 an−1 + sn an
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
= · · · = s1 a1 + · · · + sn−1 an−1 + sn an
and that any integer s1 a1 + · · · + sn−1 an−1 + sn an is a multiple of
(a1 , . . . , an )
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
= · · · = s1 a1 + · · · + sn−1 an−1 + sn an
and that any integer s1 a1 + · · · + sn−1 an−1 + sn an is a multiple of
(a1 , . . . , an ) (induction proof
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
= · · · = s1 a1 + · · · + sn−1 an−1 + sn an
and that any integer s1 a1 + · · · + sn−1 an−1 + sn an is a multiple of
(a1 , . . . , an ) (induction proof, do it).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
= · · · = s1 a1 + · · · + sn−1 an−1 + sn an
and that any integer s1 a1 + · · · + sn−1 an−1 + sn an is a multiple of
(a1 , . . . , an ) (induction proof, do it).
Now mimic the proof of the preceding result
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
= · · · = s1 a1 + · · · + sn−1 an−1 + sn an
and that any integer s1 a1 + · · · + sn−1 an−1 + sn an is a multiple of
(a1 , . . . , an ) (induction proof, do it).
Now mimic the proof of the preceding result (good exercise,
too).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods
Trial Division Fermat Factorization Fermat Numbers Linear Diophantine Equations
Theorem. Let a1 , . . . , an be nonzero integers. The equation
a1 x1 + · · · + an xn = c has an integral solution (x1 , . . . , xn ) iff
(a1 , . . . , an )|c. In this case, the equation has infinitely many
solutions.
Proof. First note that
(a1 , . . . , an ) = (a1 , . . . , an−2 , (an−1 , an ))
= (a1 , . . . , an−2 , sn−1 an−1 + sn an )
= · · · = s1 a1 + · · · + sn−1 an−1 + sn an
and that any integer s1 a1 + · · · + sn−1 an−1 + sn an is a multiple of
(a1 , . . . , an ) (induction proof, do it).
Now mimic the proof of the preceding result (good exercise,
too).
Bernd Schröder Louisiana Tech University, College of Engineering and Science
Factorization Methods