Primes congruent to a mod n.
$begingroup$
Is there at least one prime p that is congruent to a mod n, where n can be any positive integer and a can be any non-negative integer less than n?
elementary-number-theory prime-numbers modular-arithmetic distribution-of-primes
$endgroup$
add a comment |
$begingroup$
Is there at least one prime p that is congruent to a mod n, where n can be any positive integer and a can be any non-negative integer less than n?
elementary-number-theory prime-numbers modular-arithmetic distribution-of-primes
$endgroup$
3
$begingroup$
well, if $gcd(a,n) = 1,$ yes.
$endgroup$
– Will Jagy
Jan 18 at 1:58
2
$begingroup$
See Dirichlet's Theorem on Primes in Arithmetic Progressions
$endgroup$
– lulu
Jan 18 at 2:00
1
$begingroup$
for example, there is no prime $p equiv 15 pmod {30}$
$endgroup$
– Will Jagy
Jan 18 at 2:00
$begingroup$
So is there a result that establishes in which cases of a and n there is no prime p that satisfies the congruence?
$endgroup$
– Kronecker
Jan 18 at 2:55
$begingroup$
@user343996 If $a=0$ , then there is no such prime, if $n$ is composite. If $ane 0$ and $gcd(a,n)ne 1$, then there is no such prime, if $a$ is composite.
$endgroup$
– Peter
Jan 18 at 8:49
add a comment |
$begingroup$
Is there at least one prime p that is congruent to a mod n, where n can be any positive integer and a can be any non-negative integer less than n?
elementary-number-theory prime-numbers modular-arithmetic distribution-of-primes
$endgroup$
Is there at least one prime p that is congruent to a mod n, where n can be any positive integer and a can be any non-negative integer less than n?
elementary-number-theory prime-numbers modular-arithmetic distribution-of-primes
elementary-number-theory prime-numbers modular-arithmetic distribution-of-primes
edited Jan 18 at 17:13
Kronecker
asked Jan 18 at 1:55
KroneckerKronecker
895
895
3
$begingroup$
well, if $gcd(a,n) = 1,$ yes.
$endgroup$
– Will Jagy
Jan 18 at 1:58
2
$begingroup$
See Dirichlet's Theorem on Primes in Arithmetic Progressions
$endgroup$
– lulu
Jan 18 at 2:00
1
$begingroup$
for example, there is no prime $p equiv 15 pmod {30}$
$endgroup$
– Will Jagy
Jan 18 at 2:00
$begingroup$
So is there a result that establishes in which cases of a and n there is no prime p that satisfies the congruence?
$endgroup$
– Kronecker
Jan 18 at 2:55
$begingroup$
@user343996 If $a=0$ , then there is no such prime, if $n$ is composite. If $ane 0$ and $gcd(a,n)ne 1$, then there is no such prime, if $a$ is composite.
$endgroup$
– Peter
Jan 18 at 8:49
add a comment |
3
$begingroup$
well, if $gcd(a,n) = 1,$ yes.
$endgroup$
– Will Jagy
Jan 18 at 1:58
2
$begingroup$
See Dirichlet's Theorem on Primes in Arithmetic Progressions
$endgroup$
– lulu
Jan 18 at 2:00
1
$begingroup$
for example, there is no prime $p equiv 15 pmod {30}$
$endgroup$
– Will Jagy
Jan 18 at 2:00
$begingroup$
So is there a result that establishes in which cases of a and n there is no prime p that satisfies the congruence?
$endgroup$
– Kronecker
Jan 18 at 2:55
$begingroup$
@user343996 If $a=0$ , then there is no such prime, if $n$ is composite. If $ane 0$ and $gcd(a,n)ne 1$, then there is no such prime, if $a$ is composite.
$endgroup$
– Peter
Jan 18 at 8:49
3
3
$begingroup$
well, if $gcd(a,n) = 1,$ yes.
$endgroup$
– Will Jagy
Jan 18 at 1:58
$begingroup$
well, if $gcd(a,n) = 1,$ yes.
$endgroup$
– Will Jagy
Jan 18 at 1:58
2
2
$begingroup$
See Dirichlet's Theorem on Primes in Arithmetic Progressions
$endgroup$
– lulu
Jan 18 at 2:00
$begingroup$
See Dirichlet's Theorem on Primes in Arithmetic Progressions
$endgroup$
– lulu
Jan 18 at 2:00
1
1
$begingroup$
for example, there is no prime $p equiv 15 pmod {30}$
$endgroup$
– Will Jagy
Jan 18 at 2:00
$begingroup$
for example, there is no prime $p equiv 15 pmod {30}$
$endgroup$
– Will Jagy
Jan 18 at 2:00
$begingroup$
So is there a result that establishes in which cases of a and n there is no prime p that satisfies the congruence?
$endgroup$
– Kronecker
Jan 18 at 2:55
$begingroup$
So is there a result that establishes in which cases of a and n there is no prime p that satisfies the congruence?
$endgroup$
– Kronecker
Jan 18 at 2:55
$begingroup$
@user343996 If $a=0$ , then there is no such prime, if $n$ is composite. If $ane 0$ and $gcd(a,n)ne 1$, then there is no such prime, if $a$ is composite.
$endgroup$
– Peter
Jan 18 at 8:49
$begingroup$
@user343996 If $a=0$ , then there is no such prime, if $n$ is composite. If $ane 0$ and $gcd(a,n)ne 1$, then there is no such prime, if $a$ is composite.
$endgroup$
– Peter
Jan 18 at 8:49
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
The complete answer is given by the different comments:
If $(a,n)=1$ then there are infinite primes that satisfy the equation $p=a$ mod $n$. This is the content of the Dirichlet's theorem on arithmetic progressions. Moreover, the primes are evenly distributed (asymptotically) among the congruence classes modulo $n$ containing the $a$'s coprime to $n$.
If $(a,n)>1$, we can have to cases:
1) If $a$ is prime, then we only have the trivial solution $p=a$.
Proof: If $a$ is prime and $(a,n)>1$ then $a$ is a factor of $n$, so $n=ab$ for some positive integer $b$, so the equation can be written $p = a$ mod $ab$, meaning $p$ = $a + (ab)c$ for some integer $c$. Then $p = a(1+bc)$, but $a$ is prime, so there is only one solution, namely when $c=0$.
2) If $a$ is composite, then there are no solutions.
Proof: $p = a$ mod $n$, means $p$ = $a + nI$ for some integer $I$, let's define $J=nI$ so now $p$ = $a + J$. Now, since $a$ and $n$ are not coprime, the same applies for $a$ and $J$, so by Bézout's identity: $aA+JB=C$ where $C > 1$ is the gcd of $a$ and $J$, and $A$ and $B$ are non-zero integers. Then $p$ = $a + ((C-aA)/B)$. And since $C$ is a factor of $a$ we have $p=CD + ((C-CDA)/B)$ for some positive integer $D$. Then $p=C(1+((1-DA)/B)$. Now, because $C>1$, for $p$ to be prime we need $(1+((1-DA)/B)$ to be equal to $1$, so $(1-DA)$ needs to be zero. But we said that $D$ is a positive integer, so $A$ has to be zero. But we said that $A$ is non-zero integer, we can conclude then that $p$ cannot be prime.
$endgroup$
$begingroup$
Just one note: this solution assumes $aleq n$; we have for example at $a=6$ and $n=4$ the prime $p=2equiv 6bmod 4$. Another way to put it: for any $a$ where $gcd(a,n)>1$ all values $mequiv abmod n$ so that $m>n$ are composite.
$endgroup$
– Carl Schildkraut
Jan 18 at 16:53
$begingroup$
Thank you, I always thought that the congruence equations assumed that $a≤n$. I will edit the question so that this is explicit.
$endgroup$
– Kronecker
Jan 18 at 17:01
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f3077747%2fprimes-congruent-to-a-mod-n%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The complete answer is given by the different comments:
If $(a,n)=1$ then there are infinite primes that satisfy the equation $p=a$ mod $n$. This is the content of the Dirichlet's theorem on arithmetic progressions. Moreover, the primes are evenly distributed (asymptotically) among the congruence classes modulo $n$ containing the $a$'s coprime to $n$.
If $(a,n)>1$, we can have to cases:
1) If $a$ is prime, then we only have the trivial solution $p=a$.
Proof: If $a$ is prime and $(a,n)>1$ then $a$ is a factor of $n$, so $n=ab$ for some positive integer $b$, so the equation can be written $p = a$ mod $ab$, meaning $p$ = $a + (ab)c$ for some integer $c$. Then $p = a(1+bc)$, but $a$ is prime, so there is only one solution, namely when $c=0$.
2) If $a$ is composite, then there are no solutions.
Proof: $p = a$ mod $n$, means $p$ = $a + nI$ for some integer $I$, let's define $J=nI$ so now $p$ = $a + J$. Now, since $a$ and $n$ are not coprime, the same applies for $a$ and $J$, so by Bézout's identity: $aA+JB=C$ where $C > 1$ is the gcd of $a$ and $J$, and $A$ and $B$ are non-zero integers. Then $p$ = $a + ((C-aA)/B)$. And since $C$ is a factor of $a$ we have $p=CD + ((C-CDA)/B)$ for some positive integer $D$. Then $p=C(1+((1-DA)/B)$. Now, because $C>1$, for $p$ to be prime we need $(1+((1-DA)/B)$ to be equal to $1$, so $(1-DA)$ needs to be zero. But we said that $D$ is a positive integer, so $A$ has to be zero. But we said that $A$ is non-zero integer, we can conclude then that $p$ cannot be prime.
$endgroup$
$begingroup$
Just one note: this solution assumes $aleq n$; we have for example at $a=6$ and $n=4$ the prime $p=2equiv 6bmod 4$. Another way to put it: for any $a$ where $gcd(a,n)>1$ all values $mequiv abmod n$ so that $m>n$ are composite.
$endgroup$
– Carl Schildkraut
Jan 18 at 16:53
$begingroup$
Thank you, I always thought that the congruence equations assumed that $a≤n$. I will edit the question so that this is explicit.
$endgroup$
– Kronecker
Jan 18 at 17:01
add a comment |
$begingroup$
The complete answer is given by the different comments:
If $(a,n)=1$ then there are infinite primes that satisfy the equation $p=a$ mod $n$. This is the content of the Dirichlet's theorem on arithmetic progressions. Moreover, the primes are evenly distributed (asymptotically) among the congruence classes modulo $n$ containing the $a$'s coprime to $n$.
If $(a,n)>1$, we can have to cases:
1) If $a$ is prime, then we only have the trivial solution $p=a$.
Proof: If $a$ is prime and $(a,n)>1$ then $a$ is a factor of $n$, so $n=ab$ for some positive integer $b$, so the equation can be written $p = a$ mod $ab$, meaning $p$ = $a + (ab)c$ for some integer $c$. Then $p = a(1+bc)$, but $a$ is prime, so there is only one solution, namely when $c=0$.
2) If $a$ is composite, then there are no solutions.
Proof: $p = a$ mod $n$, means $p$ = $a + nI$ for some integer $I$, let's define $J=nI$ so now $p$ = $a + J$. Now, since $a$ and $n$ are not coprime, the same applies for $a$ and $J$, so by Bézout's identity: $aA+JB=C$ where $C > 1$ is the gcd of $a$ and $J$, and $A$ and $B$ are non-zero integers. Then $p$ = $a + ((C-aA)/B)$. And since $C$ is a factor of $a$ we have $p=CD + ((C-CDA)/B)$ for some positive integer $D$. Then $p=C(1+((1-DA)/B)$. Now, because $C>1$, for $p$ to be prime we need $(1+((1-DA)/B)$ to be equal to $1$, so $(1-DA)$ needs to be zero. But we said that $D$ is a positive integer, so $A$ has to be zero. But we said that $A$ is non-zero integer, we can conclude then that $p$ cannot be prime.
$endgroup$
$begingroup$
Just one note: this solution assumes $aleq n$; we have for example at $a=6$ and $n=4$ the prime $p=2equiv 6bmod 4$. Another way to put it: for any $a$ where $gcd(a,n)>1$ all values $mequiv abmod n$ so that $m>n$ are composite.
$endgroup$
– Carl Schildkraut
Jan 18 at 16:53
$begingroup$
Thank you, I always thought that the congruence equations assumed that $a≤n$. I will edit the question so that this is explicit.
$endgroup$
– Kronecker
Jan 18 at 17:01
add a comment |
$begingroup$
The complete answer is given by the different comments:
If $(a,n)=1$ then there are infinite primes that satisfy the equation $p=a$ mod $n$. This is the content of the Dirichlet's theorem on arithmetic progressions. Moreover, the primes are evenly distributed (asymptotically) among the congruence classes modulo $n$ containing the $a$'s coprime to $n$.
If $(a,n)>1$, we can have to cases:
1) If $a$ is prime, then we only have the trivial solution $p=a$.
Proof: If $a$ is prime and $(a,n)>1$ then $a$ is a factor of $n$, so $n=ab$ for some positive integer $b$, so the equation can be written $p = a$ mod $ab$, meaning $p$ = $a + (ab)c$ for some integer $c$. Then $p = a(1+bc)$, but $a$ is prime, so there is only one solution, namely when $c=0$.
2) If $a$ is composite, then there are no solutions.
Proof: $p = a$ mod $n$, means $p$ = $a + nI$ for some integer $I$, let's define $J=nI$ so now $p$ = $a + J$. Now, since $a$ and $n$ are not coprime, the same applies for $a$ and $J$, so by Bézout's identity: $aA+JB=C$ where $C > 1$ is the gcd of $a$ and $J$, and $A$ and $B$ are non-zero integers. Then $p$ = $a + ((C-aA)/B)$. And since $C$ is a factor of $a$ we have $p=CD + ((C-CDA)/B)$ for some positive integer $D$. Then $p=C(1+((1-DA)/B)$. Now, because $C>1$, for $p$ to be prime we need $(1+((1-DA)/B)$ to be equal to $1$, so $(1-DA)$ needs to be zero. But we said that $D$ is a positive integer, so $A$ has to be zero. But we said that $A$ is non-zero integer, we can conclude then that $p$ cannot be prime.
$endgroup$
The complete answer is given by the different comments:
If $(a,n)=1$ then there are infinite primes that satisfy the equation $p=a$ mod $n$. This is the content of the Dirichlet's theorem on arithmetic progressions. Moreover, the primes are evenly distributed (asymptotically) among the congruence classes modulo $n$ containing the $a$'s coprime to $n$.
If $(a,n)>1$, we can have to cases:
1) If $a$ is prime, then we only have the trivial solution $p=a$.
Proof: If $a$ is prime and $(a,n)>1$ then $a$ is a factor of $n$, so $n=ab$ for some positive integer $b$, so the equation can be written $p = a$ mod $ab$, meaning $p$ = $a + (ab)c$ for some integer $c$. Then $p = a(1+bc)$, but $a$ is prime, so there is only one solution, namely when $c=0$.
2) If $a$ is composite, then there are no solutions.
Proof: $p = a$ mod $n$, means $p$ = $a + nI$ for some integer $I$, let's define $J=nI$ so now $p$ = $a + J$. Now, since $a$ and $n$ are not coprime, the same applies for $a$ and $J$, so by Bézout's identity: $aA+JB=C$ where $C > 1$ is the gcd of $a$ and $J$, and $A$ and $B$ are non-zero integers. Then $p$ = $a + ((C-aA)/B)$. And since $C$ is a factor of $a$ we have $p=CD + ((C-CDA)/B)$ for some positive integer $D$. Then $p=C(1+((1-DA)/B)$. Now, because $C>1$, for $p$ to be prime we need $(1+((1-DA)/B)$ to be equal to $1$, so $(1-DA)$ needs to be zero. But we said that $D$ is a positive integer, so $A$ has to be zero. But we said that $A$ is non-zero integer, we can conclude then that $p$ cannot be prime.
edited Jan 18 at 16:56
answered Jan 18 at 16:44
KroneckerKronecker
895
895
$begingroup$
Just one note: this solution assumes $aleq n$; we have for example at $a=6$ and $n=4$ the prime $p=2equiv 6bmod 4$. Another way to put it: for any $a$ where $gcd(a,n)>1$ all values $mequiv abmod n$ so that $m>n$ are composite.
$endgroup$
– Carl Schildkraut
Jan 18 at 16:53
$begingroup$
Thank you, I always thought that the congruence equations assumed that $a≤n$. I will edit the question so that this is explicit.
$endgroup$
– Kronecker
Jan 18 at 17:01
add a comment |
$begingroup$
Just one note: this solution assumes $aleq n$; we have for example at $a=6$ and $n=4$ the prime $p=2equiv 6bmod 4$. Another way to put it: for any $a$ where $gcd(a,n)>1$ all values $mequiv abmod n$ so that $m>n$ are composite.
$endgroup$
– Carl Schildkraut
Jan 18 at 16:53
$begingroup$
Thank you, I always thought that the congruence equations assumed that $a≤n$. I will edit the question so that this is explicit.
$endgroup$
– Kronecker
Jan 18 at 17:01
$begingroup$
Just one note: this solution assumes $aleq n$; we have for example at $a=6$ and $n=4$ the prime $p=2equiv 6bmod 4$. Another way to put it: for any $a$ where $gcd(a,n)>1$ all values $mequiv abmod n$ so that $m>n$ are composite.
$endgroup$
– Carl Schildkraut
Jan 18 at 16:53
$begingroup$
Just one note: this solution assumes $aleq n$; we have for example at $a=6$ and $n=4$ the prime $p=2equiv 6bmod 4$. Another way to put it: for any $a$ where $gcd(a,n)>1$ all values $mequiv abmod n$ so that $m>n$ are composite.
$endgroup$
– Carl Schildkraut
Jan 18 at 16:53
$begingroup$
Thank you, I always thought that the congruence equations assumed that $a≤n$. I will edit the question so that this is explicit.
$endgroup$
– Kronecker
Jan 18 at 17:01
$begingroup$
Thank you, I always thought that the congruence equations assumed that $a≤n$. I will edit the question so that this is explicit.
$endgroup$
– Kronecker
Jan 18 at 17:01
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.
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%2f3077747%2fprimes-congruent-to-a-mod-n%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
3
$begingroup$
well, if $gcd(a,n) = 1,$ yes.
$endgroup$
– Will Jagy
Jan 18 at 1:58
2
$begingroup$
See Dirichlet's Theorem on Primes in Arithmetic Progressions
$endgroup$
– lulu
Jan 18 at 2:00
1
$begingroup$
for example, there is no prime $p equiv 15 pmod {30}$
$endgroup$
– Will Jagy
Jan 18 at 2:00
$begingroup$
So is there a result that establishes in which cases of a and n there is no prime p that satisfies the congruence?
$endgroup$
– Kronecker
Jan 18 at 2:55
$begingroup$
@user343996 If $a=0$ , then there is no such prime, if $n$ is composite. If $ane 0$ and $gcd(a,n)ne 1$, then there is no such prime, if $a$ is composite.
$endgroup$
– Peter
Jan 18 at 8:49