Use Fermat's Theorem to prove 10001 is composite
up vote
4
down vote
favorite
I need to use Fermat's Theorem to prove that 10001 is not prime. I understand that I just need to find a counterexample where $a^{10000}$ mod 10001 = 1 mod 10001 does not hold true, but this seems kind of difficult with such large numbers. Any ideas?
prime-numbers
add a comment |
up vote
4
down vote
favorite
I need to use Fermat's Theorem to prove that 10001 is not prime. I understand that I just need to find a counterexample where $a^{10000}$ mod 10001 = 1 mod 10001 does not hold true, but this seems kind of difficult with such large numbers. Any ideas?
prime-numbers
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I need to use Fermat's Theorem to prove that 10001 is not prime. I understand that I just need to find a counterexample where $a^{10000}$ mod 10001 = 1 mod 10001 does not hold true, but this seems kind of difficult with such large numbers. Any ideas?
prime-numbers
I need to use Fermat's Theorem to prove that 10001 is not prime. I understand that I just need to find a counterexample where $a^{10000}$ mod 10001 = 1 mod 10001 does not hold true, but this seems kind of difficult with such large numbers. Any ideas?
prime-numbers
prime-numbers
edited 3 hours ago
Geneten48
596
596
asked 3 hours ago
katie
233
233
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
2
down vote
Fermat pseudoprimes to any given base are really very rare, so you might as well just launch in with $2$ and hope for the best. This is a bit tedious but perfectly doable by repeated squaring:
$$10000 = 2^{13}+2^{10}+2^9+2^8+2^4$$
so you just need to keep on squaring $2$ (modulo $10001$) thirteen times.
add a comment |
up vote
2
down vote
This is a bit of a cheat, but another theorem of Fermat's says that $10001$ cannot be prime because it has two different representations as a sum of two squares:
$$10001=100^2+1^2=65^2+76^2$$
The "cheat" here is that, while $100^2+1^2$ is easy enough to spot, finding the other sum of two squares involved almost as much work as searching for the factors themselves would have taken.
It really is cheating - being at least as hard as factoring, since it immediately yields the factors via $ gcd(100001, 76 pm 65cdot 100) = 137,,73. $ Maybe that explains the downvote (not from me).
– Bill Dubuque
1 hour ago
@BillDubuque, agreed. Nice way to get the factors.
– Barry Cipra
1 hour ago
add a comment |
up vote
1
down vote
Another method, also based on Fermat's little theorem, is the following.
First notice $$10001=10^4+1=frac{10^8-1}{10^4-1}$$
So finding a prime factor of $10^8-1$ that is not also a factor of $10^4-1$ is enough. The prime factors of $10^4-1$ are easy to determine even by hand calculation : $3,11,101$
Another prime dividing $10^8-1$ must be of the form $8k+1$
This is because the smallest positive integer $k$ with $ 10^kequiv 1mod q $ (the order of $10$ modulo $q$) is $8$ and Fermat's little theorem gives $ 10^{q-1}equiv 1mod q $ which shows $8mid q-1$. So, we only need to verify the primes of the form $8k+1$. The first three are $17,41,73$
$73$ turns out to divide $10001$ and proves that $10001$ is composite.
For a bit larger numbers (but not too large) of a special form this method should be superior to the direct calculation of the power.
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Fermat pseudoprimes to any given base are really very rare, so you might as well just launch in with $2$ and hope for the best. This is a bit tedious but perfectly doable by repeated squaring:
$$10000 = 2^{13}+2^{10}+2^9+2^8+2^4$$
so you just need to keep on squaring $2$ (modulo $10001$) thirteen times.
add a comment |
up vote
2
down vote
Fermat pseudoprimes to any given base are really very rare, so you might as well just launch in with $2$ and hope for the best. This is a bit tedious but perfectly doable by repeated squaring:
$$10000 = 2^{13}+2^{10}+2^9+2^8+2^4$$
so you just need to keep on squaring $2$ (modulo $10001$) thirteen times.
add a comment |
up vote
2
down vote
up vote
2
down vote
Fermat pseudoprimes to any given base are really very rare, so you might as well just launch in with $2$ and hope for the best. This is a bit tedious but perfectly doable by repeated squaring:
$$10000 = 2^{13}+2^{10}+2^9+2^8+2^4$$
so you just need to keep on squaring $2$ (modulo $10001$) thirteen times.
Fermat pseudoprimes to any given base are really very rare, so you might as well just launch in with $2$ and hope for the best. This is a bit tedious but perfectly doable by repeated squaring:
$$10000 = 2^{13}+2^{10}+2^9+2^8+2^4$$
so you just need to keep on squaring $2$ (modulo $10001$) thirteen times.
answered 3 hours ago
Patrick Stevens
28.1k52874
28.1k52874
add a comment |
add a comment |
up vote
2
down vote
This is a bit of a cheat, but another theorem of Fermat's says that $10001$ cannot be prime because it has two different representations as a sum of two squares:
$$10001=100^2+1^2=65^2+76^2$$
The "cheat" here is that, while $100^2+1^2$ is easy enough to spot, finding the other sum of two squares involved almost as much work as searching for the factors themselves would have taken.
It really is cheating - being at least as hard as factoring, since it immediately yields the factors via $ gcd(100001, 76 pm 65cdot 100) = 137,,73. $ Maybe that explains the downvote (not from me).
– Bill Dubuque
1 hour ago
@BillDubuque, agreed. Nice way to get the factors.
– Barry Cipra
1 hour ago
add a comment |
up vote
2
down vote
This is a bit of a cheat, but another theorem of Fermat's says that $10001$ cannot be prime because it has two different representations as a sum of two squares:
$$10001=100^2+1^2=65^2+76^2$$
The "cheat" here is that, while $100^2+1^2$ is easy enough to spot, finding the other sum of two squares involved almost as much work as searching for the factors themselves would have taken.
It really is cheating - being at least as hard as factoring, since it immediately yields the factors via $ gcd(100001, 76 pm 65cdot 100) = 137,,73. $ Maybe that explains the downvote (not from me).
– Bill Dubuque
1 hour ago
@BillDubuque, agreed. Nice way to get the factors.
– Barry Cipra
1 hour ago
add a comment |
up vote
2
down vote
up vote
2
down vote
This is a bit of a cheat, but another theorem of Fermat's says that $10001$ cannot be prime because it has two different representations as a sum of two squares:
$$10001=100^2+1^2=65^2+76^2$$
The "cheat" here is that, while $100^2+1^2$ is easy enough to spot, finding the other sum of two squares involved almost as much work as searching for the factors themselves would have taken.
This is a bit of a cheat, but another theorem of Fermat's says that $10001$ cannot be prime because it has two different representations as a sum of two squares:
$$10001=100^2+1^2=65^2+76^2$$
The "cheat" here is that, while $100^2+1^2$ is easy enough to spot, finding the other sum of two squares involved almost as much work as searching for the factors themselves would have taken.
answered 2 hours ago
Barry Cipra
58.3k652121
58.3k652121
It really is cheating - being at least as hard as factoring, since it immediately yields the factors via $ gcd(100001, 76 pm 65cdot 100) = 137,,73. $ Maybe that explains the downvote (not from me).
– Bill Dubuque
1 hour ago
@BillDubuque, agreed. Nice way to get the factors.
– Barry Cipra
1 hour ago
add a comment |
It really is cheating - being at least as hard as factoring, since it immediately yields the factors via $ gcd(100001, 76 pm 65cdot 100) = 137,,73. $ Maybe that explains the downvote (not from me).
– Bill Dubuque
1 hour ago
@BillDubuque, agreed. Nice way to get the factors.
– Barry Cipra
1 hour ago
It really is cheating - being at least as hard as factoring, since it immediately yields the factors via $ gcd(100001, 76 pm 65cdot 100) = 137,,73. $ Maybe that explains the downvote (not from me).
– Bill Dubuque
1 hour ago
It really is cheating - being at least as hard as factoring, since it immediately yields the factors via $ gcd(100001, 76 pm 65cdot 100) = 137,,73. $ Maybe that explains the downvote (not from me).
– Bill Dubuque
1 hour ago
@BillDubuque, agreed. Nice way to get the factors.
– Barry Cipra
1 hour ago
@BillDubuque, agreed. Nice way to get the factors.
– Barry Cipra
1 hour ago
add a comment |
up vote
1
down vote
Another method, also based on Fermat's little theorem, is the following.
First notice $$10001=10^4+1=frac{10^8-1}{10^4-1}$$
So finding a prime factor of $10^8-1$ that is not also a factor of $10^4-1$ is enough. The prime factors of $10^4-1$ are easy to determine even by hand calculation : $3,11,101$
Another prime dividing $10^8-1$ must be of the form $8k+1$
This is because the smallest positive integer $k$ with $ 10^kequiv 1mod q $ (the order of $10$ modulo $q$) is $8$ and Fermat's little theorem gives $ 10^{q-1}equiv 1mod q $ which shows $8mid q-1$. So, we only need to verify the primes of the form $8k+1$. The first three are $17,41,73$
$73$ turns out to divide $10001$ and proves that $10001$ is composite.
For a bit larger numbers (but not too large) of a special form this method should be superior to the direct calculation of the power.
add a comment |
up vote
1
down vote
Another method, also based on Fermat's little theorem, is the following.
First notice $$10001=10^4+1=frac{10^8-1}{10^4-1}$$
So finding a prime factor of $10^8-1$ that is not also a factor of $10^4-1$ is enough. The prime factors of $10^4-1$ are easy to determine even by hand calculation : $3,11,101$
Another prime dividing $10^8-1$ must be of the form $8k+1$
This is because the smallest positive integer $k$ with $ 10^kequiv 1mod q $ (the order of $10$ modulo $q$) is $8$ and Fermat's little theorem gives $ 10^{q-1}equiv 1mod q $ which shows $8mid q-1$. So, we only need to verify the primes of the form $8k+1$. The first three are $17,41,73$
$73$ turns out to divide $10001$ and proves that $10001$ is composite.
For a bit larger numbers (but not too large) of a special form this method should be superior to the direct calculation of the power.
add a comment |
up vote
1
down vote
up vote
1
down vote
Another method, also based on Fermat's little theorem, is the following.
First notice $$10001=10^4+1=frac{10^8-1}{10^4-1}$$
So finding a prime factor of $10^8-1$ that is not also a factor of $10^4-1$ is enough. The prime factors of $10^4-1$ are easy to determine even by hand calculation : $3,11,101$
Another prime dividing $10^8-1$ must be of the form $8k+1$
This is because the smallest positive integer $k$ with $ 10^kequiv 1mod q $ (the order of $10$ modulo $q$) is $8$ and Fermat's little theorem gives $ 10^{q-1}equiv 1mod q $ which shows $8mid q-1$. So, we only need to verify the primes of the form $8k+1$. The first three are $17,41,73$
$73$ turns out to divide $10001$ and proves that $10001$ is composite.
For a bit larger numbers (but not too large) of a special form this method should be superior to the direct calculation of the power.
Another method, also based on Fermat's little theorem, is the following.
First notice $$10001=10^4+1=frac{10^8-1}{10^4-1}$$
So finding a prime factor of $10^8-1$ that is not also a factor of $10^4-1$ is enough. The prime factors of $10^4-1$ are easy to determine even by hand calculation : $3,11,101$
Another prime dividing $10^8-1$ must be of the form $8k+1$
This is because the smallest positive integer $k$ with $ 10^kequiv 1mod q $ (the order of $10$ modulo $q$) is $8$ and Fermat's little theorem gives $ 10^{q-1}equiv 1mod q $ which shows $8mid q-1$. So, we only need to verify the primes of the form $8k+1$. The first three are $17,41,73$
$73$ turns out to divide $10001$ and proves that $10001$ is composite.
For a bit larger numbers (but not too large) of a special form this method should be superior to the direct calculation of the power.
answered 2 hours ago
Peter
46.2k1039125
46.2k1039125
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3020674%2fuse-fermats-theorem-to-prove-10001-is-composite%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown