For $a>0$ prime $p=a+b$ and $pcdot a+b$ and $pcdot b+a$ gives all primes
$begingroup$
How many primes will not be found from prime $p=a+b$ and prime producing formulae $acdot p+b$ and $bcdot p+a$? An example for $11=2+9$ gives $2cdot 11+9=31$ and $9cdot 11+2=101$. Is there a maximum prime that will not be found? The larger the prime, the more numbers produced, $p-1$ of them; so it seems inevitable that all but a few primes will not be found. Do you agree?
prime-numbers
$endgroup$
|
show 5 more comments
$begingroup$
How many primes will not be found from prime $p=a+b$ and prime producing formulae $acdot p+b$ and $bcdot p+a$? An example for $11=2+9$ gives $2cdot 11+9=31$ and $9cdot 11+2=101$. Is there a maximum prime that will not be found? The larger the prime, the more numbers produced, $p-1$ of them; so it seems inevitable that all but a few primes will not be found. Do you agree?
prime-numbers
$endgroup$
2
$begingroup$
I don't understand. Are you fixing $p$? Are you fixing $p$ as well as $a$ and $b$? In either case, you only get a finite number of numbers out of $ap+b$ or $bp+a$. Did you mean to write something like $ak+b$ or $pk+b$ where $k$ is allowed to vary over the integers? (or another option, do you fix $p$, allow $a$ and $b$ to vary over all the integers, not just positive ones?)
$endgroup$
– Ovi
Jan 6 at 21:45
$begingroup$
@Ovi So indeed "all but a few primes will not be found" ...
$endgroup$
– Hagen von Eitzen
Jan 6 at 21:53
$begingroup$
Continuing with all partitions of 11: 1+10, 2+9, 3+8, 4+7, and 5+6; these pairs are now the pairs a +b and p=11 for the ten numbers to be found. When p=13, the pairs to be tested are 1+12, 2+11, 3+10, 4+9, 5+8, and 6+7 to give 13-1=12 new numbers to be tested. Of course, repetitions do occur from different primes. What will be the largest prime NOT found by this method? I did not find 11.
$endgroup$
– J. M. Bergot
Jan 6 at 21:55
$begingroup$
@HagenvonEitzen I think, under the most straightforward interpretation, all but a few primes will not be found.
$endgroup$
– Ovi
Jan 6 at 21:55
2
$begingroup$
Do some experiments to see how many are prime as p increases.
$endgroup$
– J. M. Bergot
Jan 6 at 22:25
|
show 5 more comments
$begingroup$
How many primes will not be found from prime $p=a+b$ and prime producing formulae $acdot p+b$ and $bcdot p+a$? An example for $11=2+9$ gives $2cdot 11+9=31$ and $9cdot 11+2=101$. Is there a maximum prime that will not be found? The larger the prime, the more numbers produced, $p-1$ of them; so it seems inevitable that all but a few primes will not be found. Do you agree?
prime-numbers
$endgroup$
How many primes will not be found from prime $p=a+b$ and prime producing formulae $acdot p+b$ and $bcdot p+a$? An example for $11=2+9$ gives $2cdot 11+9=31$ and $9cdot 11+2=101$. Is there a maximum prime that will not be found? The larger the prime, the more numbers produced, $p-1$ of them; so it seems inevitable that all but a few primes will not be found. Do you agree?
prime-numbers
prime-numbers
edited Jan 6 at 21:41
rtybase
11k21533
11k21533
asked Jan 6 at 21:36
J. M. BergotJ. M. Bergot
40228
40228
2
$begingroup$
I don't understand. Are you fixing $p$? Are you fixing $p$ as well as $a$ and $b$? In either case, you only get a finite number of numbers out of $ap+b$ or $bp+a$. Did you mean to write something like $ak+b$ or $pk+b$ where $k$ is allowed to vary over the integers? (or another option, do you fix $p$, allow $a$ and $b$ to vary over all the integers, not just positive ones?)
$endgroup$
– Ovi
Jan 6 at 21:45
$begingroup$
@Ovi So indeed "all but a few primes will not be found" ...
$endgroup$
– Hagen von Eitzen
Jan 6 at 21:53
$begingroup$
Continuing with all partitions of 11: 1+10, 2+9, 3+8, 4+7, and 5+6; these pairs are now the pairs a +b and p=11 for the ten numbers to be found. When p=13, the pairs to be tested are 1+12, 2+11, 3+10, 4+9, 5+8, and 6+7 to give 13-1=12 new numbers to be tested. Of course, repetitions do occur from different primes. What will be the largest prime NOT found by this method? I did not find 11.
$endgroup$
– J. M. Bergot
Jan 6 at 21:55
$begingroup$
@HagenvonEitzen I think, under the most straightforward interpretation, all but a few primes will not be found.
$endgroup$
– Ovi
Jan 6 at 21:55
2
$begingroup$
Do some experiments to see how many are prime as p increases.
$endgroup$
– J. M. Bergot
Jan 6 at 22:25
|
show 5 more comments
2
$begingroup$
I don't understand. Are you fixing $p$? Are you fixing $p$ as well as $a$ and $b$? In either case, you only get a finite number of numbers out of $ap+b$ or $bp+a$. Did you mean to write something like $ak+b$ or $pk+b$ where $k$ is allowed to vary over the integers? (or another option, do you fix $p$, allow $a$ and $b$ to vary over all the integers, not just positive ones?)
$endgroup$
– Ovi
Jan 6 at 21:45
$begingroup$
@Ovi So indeed "all but a few primes will not be found" ...
$endgroup$
– Hagen von Eitzen
Jan 6 at 21:53
$begingroup$
Continuing with all partitions of 11: 1+10, 2+9, 3+8, 4+7, and 5+6; these pairs are now the pairs a +b and p=11 for the ten numbers to be found. When p=13, the pairs to be tested are 1+12, 2+11, 3+10, 4+9, 5+8, and 6+7 to give 13-1=12 new numbers to be tested. Of course, repetitions do occur from different primes. What will be the largest prime NOT found by this method? I did not find 11.
$endgroup$
– J. M. Bergot
Jan 6 at 21:55
$begingroup$
@HagenvonEitzen I think, under the most straightforward interpretation, all but a few primes will not be found.
$endgroup$
– Ovi
Jan 6 at 21:55
2
$begingroup$
Do some experiments to see how many are prime as p increases.
$endgroup$
– J. M. Bergot
Jan 6 at 22:25
2
2
$begingroup$
I don't understand. Are you fixing $p$? Are you fixing $p$ as well as $a$ and $b$? In either case, you only get a finite number of numbers out of $ap+b$ or $bp+a$. Did you mean to write something like $ak+b$ or $pk+b$ where $k$ is allowed to vary over the integers? (or another option, do you fix $p$, allow $a$ and $b$ to vary over all the integers, not just positive ones?)
$endgroup$
– Ovi
Jan 6 at 21:45
$begingroup$
I don't understand. Are you fixing $p$? Are you fixing $p$ as well as $a$ and $b$? In either case, you only get a finite number of numbers out of $ap+b$ or $bp+a$. Did you mean to write something like $ak+b$ or $pk+b$ where $k$ is allowed to vary over the integers? (or another option, do you fix $p$, allow $a$ and $b$ to vary over all the integers, not just positive ones?)
$endgroup$
– Ovi
Jan 6 at 21:45
$begingroup$
@Ovi So indeed "all but a few primes will not be found" ...
$endgroup$
– Hagen von Eitzen
Jan 6 at 21:53
$begingroup$
@Ovi So indeed "all but a few primes will not be found" ...
$endgroup$
– Hagen von Eitzen
Jan 6 at 21:53
$begingroup$
Continuing with all partitions of 11: 1+10, 2+9, 3+8, 4+7, and 5+6; these pairs are now the pairs a +b and p=11 for the ten numbers to be found. When p=13, the pairs to be tested are 1+12, 2+11, 3+10, 4+9, 5+8, and 6+7 to give 13-1=12 new numbers to be tested. Of course, repetitions do occur from different primes. What will be the largest prime NOT found by this method? I did not find 11.
$endgroup$
– J. M. Bergot
Jan 6 at 21:55
$begingroup$
Continuing with all partitions of 11: 1+10, 2+9, 3+8, 4+7, and 5+6; these pairs are now the pairs a +b and p=11 for the ten numbers to be found. When p=13, the pairs to be tested are 1+12, 2+11, 3+10, 4+9, 5+8, and 6+7 to give 13-1=12 new numbers to be tested. Of course, repetitions do occur from different primes. What will be the largest prime NOT found by this method? I did not find 11.
$endgroup$
– J. M. Bergot
Jan 6 at 21:55
$begingroup$
@HagenvonEitzen I think, under the most straightforward interpretation, all but a few primes will not be found.
$endgroup$
– Ovi
Jan 6 at 21:55
$begingroup$
@HagenvonEitzen I think, under the most straightforward interpretation, all but a few primes will not be found.
$endgroup$
– Ovi
Jan 6 at 21:55
2
2
$begingroup$
Do some experiments to see how many are prime as p increases.
$endgroup$
– J. M. Bergot
Jan 6 at 22:25
$begingroup$
Do some experiments to see how many are prime as p increases.
$endgroup$
– J. M. Bergot
Jan 6 at 22:25
|
show 5 more comments
1 Answer
1
active
oldest
votes
$begingroup$
If I understand what you're asking correctly, then the answer to your main question is almost definitely no, there is no maximum prime that will not be found. First, let me state a few things I am assuming here. First, the $a$ and $b$ are meant to be non-negative integers. Second, note that you don't need to check both $ap + b$ and $bp + a$ since if $p = a + b$, then $p = b + a$ also, so each check would be duplicated. As such, I will just only consider all possible $ap + b$. Replacing $b$ with $p - a$ gives
$$ap + left(p - aright) = left(a + 1right)p - left(a + 1right) + 1 tag{1}label{eq1}$$
Now, you are asking to check for $a$ going from $1$ to $p - 1$, inclusive. I will replace $a + 1$ with $c$, with it going from $2$ to $p$, inclusive, to get
$$cp - c + 1 = cleft(p - 1right) + 1 tag{2}label{eq2}$$
Among the primes to check, consider the Sophie Germain primes, i.e., which are primes $q$ where $2q + 1$ is also a prime. Assume there is a $c ge 2$ and $p$ which allows eqref{eq2} to be equal to $2q + 1$. This then gives
$$2q + 1 = cleft(p - 1right) + 1 tag{3}label{eq3}$$
which simplifies to
$$2q = cleft(p - 1right) tag{4}label{eq4}$$
Now, if $p = 2$, then $2q = c$, but $2 le c le p$, so $c = 2$ is the only value, resulting in $q = 1$, which is not prime. For $p gt 2$, $p$ is odd and so must be of the form $2n + 1$ for some positive integer $n$. Thus, $p - 1 = 2n$, with eqref{eq4} now becoming
$$q = cn tag{5}label{eq5}$$
However, with $q$ being a prime, then $q = c$ and $n = 1$, or $q = n$ and $c = 1$. Since $c ge 2$, as stated earlier, this requires that $c = q$ and $n = 1$. This means that just $p = 3$ can possibly work, giving the only Sophie Germain primes your algorithm creates being $2$, with $5 = 3 times 1 + 2$, plus $3$, with $7 = 3 times 2 + 1$. All other primes coming from Sophie Germain primes, starting with $5$ where $11 = 2 times 5 + 1$ as you have noticed yourself, will not work!
It's an unproven conjecture that there are an infinite # of Sophie Germain primes. However, I believe it's likely true as it would be an very unusual property of primes, IMHO, for the set of these primes to be finite.
There also other types of primes which generally will not work. Consider, for example, where both $q$ and $4q + 1$ are primes. I'm not aware of any general name for these types of primes. Anyway, eqref{eq5} then becomes
$$2q = cn tag{6}label{eq6}$$
As before, $q$ must divide $c$ or $n$. If it divides $c$, then $c = q$ and $n = 2$, which means $p = 5$, with the only $q$ which works being $3$, giving the prime to create being $13 = 4 times 3 + 1$ and, from your algorithm, $13 = 2 times 5 + 3$. If $q$ doesn't divide $c$, then it must divide $n$, so $q = n$ and $c = 2$. However, this means that $p = 2n + 1 = 2q + 1$. But this can't be true in general as it means that $q$, $2q + 1$ and $4q + 1$ must all be prime simultaneously. To see this, if $q$ is not $3$, then $q equiv 1 pmod 3$ (with $2q + 1 equiv 0 pmod 3$ in this case) or $q equiv 2 pmod 3$ (with $4q + 1 equiv 0 pmod 3$ in this other case). As such, only $q = 3$ works. There are also undoubtedly an infinite number of cases where both $q$ and $4q + 1$ are prime, starting with $7$ and $29$, so this is another set of values which won't work for you.
Consider more generally where $q$ and $2dq + 1$ are prime, for some fixed integer $d gt 2$. Using analysis similar to what I've done above will result in at least relatively stringent requirements (especially for smaller $d$) which may allow many values to work, but I suspect there will also be quite a few cases that don't, especially for larger $q$. As such, unfortunately, it seems there are a quite few other types of primes, other than just those associated with Sophie Germain ones, that won't work with your algorithm.
$endgroup$
$begingroup$
Take a look at p=11 to see that ALL ten must be checked--there are NO duplicates for the p=a+b since a and b have different positions in the formula. Begin with 1 and 10 to get 21 and 111; 2 and 9 to get 31 and 101; 3 and 8 to get 41 and 91; 4 and 7 to get 51 and 81; 5 and 6 to get 61 and 71. NO duplicates result. I'll check your remark about Germain primes.
$endgroup$
– J. M. Bergot
Jan 7 at 0:06
$begingroup$
@J.M.Bergot I agree that ALL ten must be checked. I just stated you did not check both $ap + b$ and $bp + a$ as the set of values which $ap + b$ generates is the same as $bp + a$, just in the opposite order. With $p = 11$, if you check both, there will be $20$ values to check, but only $10$ of them. However, I see what you're doing now. You assume that $a lt b$, which you didn't state. This is basically the same as what I did, except that the values are checked in a somewhat different order, but the set of values themselves are still the same.
$endgroup$
– John Omielan
Jan 7 at 0:08
$begingroup$
Yes, we agree that there will be p-1 different terms produced. I am at a public library and am NOT used to thinking when others are around-->leads to mistakes. I did some figuring with a humble calculator but did not look for Germain primes. Maybe none were found; I didn't bring my notes. I bit of a puzzle would be to find what primes produced can be found in many,many different ways depending on a variety of p's. A computer could be used as an electric space heater for winter work.
$endgroup$
– J. M. Bergot
Jan 7 at 0:13
$begingroup$
The next Sophie Germain prime is $11$, with $23 = 2 times 11 + 1$, which I noticed was the next prime not produced when I manually checked your algorithm. You can verify this yourself fairly easily, including the next one or two Sophie Germain primes of $23$ (so check $47$) and $29$ (so check $59$). Note I haven't checked to see if any other types of primes are missed, but there may be.
$endgroup$
– John Omielan
Jan 7 at 0:16
$begingroup$
I keep forgetting to use this gizmo.. I sent this into primepuzzles.net to see if anyone wants to experiment to find primes not to be found. If there are others beside Germains, then something new has been found. The library closes soon-->I'll leave for the day. ThaNXXX FOR YOUR W ORK..
$endgroup$
– J. M. Bergot
Jan 7 at 0:22
|
show 7 more comments
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%2f3064410%2ffor-a0-prime-p-ab-and-p-cdot-ab-and-p-cdot-ba-gives-all-primes%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$
If I understand what you're asking correctly, then the answer to your main question is almost definitely no, there is no maximum prime that will not be found. First, let me state a few things I am assuming here. First, the $a$ and $b$ are meant to be non-negative integers. Second, note that you don't need to check both $ap + b$ and $bp + a$ since if $p = a + b$, then $p = b + a$ also, so each check would be duplicated. As such, I will just only consider all possible $ap + b$. Replacing $b$ with $p - a$ gives
$$ap + left(p - aright) = left(a + 1right)p - left(a + 1right) + 1 tag{1}label{eq1}$$
Now, you are asking to check for $a$ going from $1$ to $p - 1$, inclusive. I will replace $a + 1$ with $c$, with it going from $2$ to $p$, inclusive, to get
$$cp - c + 1 = cleft(p - 1right) + 1 tag{2}label{eq2}$$
Among the primes to check, consider the Sophie Germain primes, i.e., which are primes $q$ where $2q + 1$ is also a prime. Assume there is a $c ge 2$ and $p$ which allows eqref{eq2} to be equal to $2q + 1$. This then gives
$$2q + 1 = cleft(p - 1right) + 1 tag{3}label{eq3}$$
which simplifies to
$$2q = cleft(p - 1right) tag{4}label{eq4}$$
Now, if $p = 2$, then $2q = c$, but $2 le c le p$, so $c = 2$ is the only value, resulting in $q = 1$, which is not prime. For $p gt 2$, $p$ is odd and so must be of the form $2n + 1$ for some positive integer $n$. Thus, $p - 1 = 2n$, with eqref{eq4} now becoming
$$q = cn tag{5}label{eq5}$$
However, with $q$ being a prime, then $q = c$ and $n = 1$, or $q = n$ and $c = 1$. Since $c ge 2$, as stated earlier, this requires that $c = q$ and $n = 1$. This means that just $p = 3$ can possibly work, giving the only Sophie Germain primes your algorithm creates being $2$, with $5 = 3 times 1 + 2$, plus $3$, with $7 = 3 times 2 + 1$. All other primes coming from Sophie Germain primes, starting with $5$ where $11 = 2 times 5 + 1$ as you have noticed yourself, will not work!
It's an unproven conjecture that there are an infinite # of Sophie Germain primes. However, I believe it's likely true as it would be an very unusual property of primes, IMHO, for the set of these primes to be finite.
There also other types of primes which generally will not work. Consider, for example, where both $q$ and $4q + 1$ are primes. I'm not aware of any general name for these types of primes. Anyway, eqref{eq5} then becomes
$$2q = cn tag{6}label{eq6}$$
As before, $q$ must divide $c$ or $n$. If it divides $c$, then $c = q$ and $n = 2$, which means $p = 5$, with the only $q$ which works being $3$, giving the prime to create being $13 = 4 times 3 + 1$ and, from your algorithm, $13 = 2 times 5 + 3$. If $q$ doesn't divide $c$, then it must divide $n$, so $q = n$ and $c = 2$. However, this means that $p = 2n + 1 = 2q + 1$. But this can't be true in general as it means that $q$, $2q + 1$ and $4q + 1$ must all be prime simultaneously. To see this, if $q$ is not $3$, then $q equiv 1 pmod 3$ (with $2q + 1 equiv 0 pmod 3$ in this case) or $q equiv 2 pmod 3$ (with $4q + 1 equiv 0 pmod 3$ in this other case). As such, only $q = 3$ works. There are also undoubtedly an infinite number of cases where both $q$ and $4q + 1$ are prime, starting with $7$ and $29$, so this is another set of values which won't work for you.
Consider more generally where $q$ and $2dq + 1$ are prime, for some fixed integer $d gt 2$. Using analysis similar to what I've done above will result in at least relatively stringent requirements (especially for smaller $d$) which may allow many values to work, but I suspect there will also be quite a few cases that don't, especially for larger $q$. As such, unfortunately, it seems there are a quite few other types of primes, other than just those associated with Sophie Germain ones, that won't work with your algorithm.
$endgroup$
$begingroup$
Take a look at p=11 to see that ALL ten must be checked--there are NO duplicates for the p=a+b since a and b have different positions in the formula. Begin with 1 and 10 to get 21 and 111; 2 and 9 to get 31 and 101; 3 and 8 to get 41 and 91; 4 and 7 to get 51 and 81; 5 and 6 to get 61 and 71. NO duplicates result. I'll check your remark about Germain primes.
$endgroup$
– J. M. Bergot
Jan 7 at 0:06
$begingroup$
@J.M.Bergot I agree that ALL ten must be checked. I just stated you did not check both $ap + b$ and $bp + a$ as the set of values which $ap + b$ generates is the same as $bp + a$, just in the opposite order. With $p = 11$, if you check both, there will be $20$ values to check, but only $10$ of them. However, I see what you're doing now. You assume that $a lt b$, which you didn't state. This is basically the same as what I did, except that the values are checked in a somewhat different order, but the set of values themselves are still the same.
$endgroup$
– John Omielan
Jan 7 at 0:08
$begingroup$
Yes, we agree that there will be p-1 different terms produced. I am at a public library and am NOT used to thinking when others are around-->leads to mistakes. I did some figuring with a humble calculator but did not look for Germain primes. Maybe none were found; I didn't bring my notes. I bit of a puzzle would be to find what primes produced can be found in many,many different ways depending on a variety of p's. A computer could be used as an electric space heater for winter work.
$endgroup$
– J. M. Bergot
Jan 7 at 0:13
$begingroup$
The next Sophie Germain prime is $11$, with $23 = 2 times 11 + 1$, which I noticed was the next prime not produced when I manually checked your algorithm. You can verify this yourself fairly easily, including the next one or two Sophie Germain primes of $23$ (so check $47$) and $29$ (so check $59$). Note I haven't checked to see if any other types of primes are missed, but there may be.
$endgroup$
– John Omielan
Jan 7 at 0:16
$begingroup$
I keep forgetting to use this gizmo.. I sent this into primepuzzles.net to see if anyone wants to experiment to find primes not to be found. If there are others beside Germains, then something new has been found. The library closes soon-->I'll leave for the day. ThaNXXX FOR YOUR W ORK..
$endgroup$
– J. M. Bergot
Jan 7 at 0:22
|
show 7 more comments
$begingroup$
If I understand what you're asking correctly, then the answer to your main question is almost definitely no, there is no maximum prime that will not be found. First, let me state a few things I am assuming here. First, the $a$ and $b$ are meant to be non-negative integers. Second, note that you don't need to check both $ap + b$ and $bp + a$ since if $p = a + b$, then $p = b + a$ also, so each check would be duplicated. As such, I will just only consider all possible $ap + b$. Replacing $b$ with $p - a$ gives
$$ap + left(p - aright) = left(a + 1right)p - left(a + 1right) + 1 tag{1}label{eq1}$$
Now, you are asking to check for $a$ going from $1$ to $p - 1$, inclusive. I will replace $a + 1$ with $c$, with it going from $2$ to $p$, inclusive, to get
$$cp - c + 1 = cleft(p - 1right) + 1 tag{2}label{eq2}$$
Among the primes to check, consider the Sophie Germain primes, i.e., which are primes $q$ where $2q + 1$ is also a prime. Assume there is a $c ge 2$ and $p$ which allows eqref{eq2} to be equal to $2q + 1$. This then gives
$$2q + 1 = cleft(p - 1right) + 1 tag{3}label{eq3}$$
which simplifies to
$$2q = cleft(p - 1right) tag{4}label{eq4}$$
Now, if $p = 2$, then $2q = c$, but $2 le c le p$, so $c = 2$ is the only value, resulting in $q = 1$, which is not prime. For $p gt 2$, $p$ is odd and so must be of the form $2n + 1$ for some positive integer $n$. Thus, $p - 1 = 2n$, with eqref{eq4} now becoming
$$q = cn tag{5}label{eq5}$$
However, with $q$ being a prime, then $q = c$ and $n = 1$, or $q = n$ and $c = 1$. Since $c ge 2$, as stated earlier, this requires that $c = q$ and $n = 1$. This means that just $p = 3$ can possibly work, giving the only Sophie Germain primes your algorithm creates being $2$, with $5 = 3 times 1 + 2$, plus $3$, with $7 = 3 times 2 + 1$. All other primes coming from Sophie Germain primes, starting with $5$ where $11 = 2 times 5 + 1$ as you have noticed yourself, will not work!
It's an unproven conjecture that there are an infinite # of Sophie Germain primes. However, I believe it's likely true as it would be an very unusual property of primes, IMHO, for the set of these primes to be finite.
There also other types of primes which generally will not work. Consider, for example, where both $q$ and $4q + 1$ are primes. I'm not aware of any general name for these types of primes. Anyway, eqref{eq5} then becomes
$$2q = cn tag{6}label{eq6}$$
As before, $q$ must divide $c$ or $n$. If it divides $c$, then $c = q$ and $n = 2$, which means $p = 5$, with the only $q$ which works being $3$, giving the prime to create being $13 = 4 times 3 + 1$ and, from your algorithm, $13 = 2 times 5 + 3$. If $q$ doesn't divide $c$, then it must divide $n$, so $q = n$ and $c = 2$. However, this means that $p = 2n + 1 = 2q + 1$. But this can't be true in general as it means that $q$, $2q + 1$ and $4q + 1$ must all be prime simultaneously. To see this, if $q$ is not $3$, then $q equiv 1 pmod 3$ (with $2q + 1 equiv 0 pmod 3$ in this case) or $q equiv 2 pmod 3$ (with $4q + 1 equiv 0 pmod 3$ in this other case). As such, only $q = 3$ works. There are also undoubtedly an infinite number of cases where both $q$ and $4q + 1$ are prime, starting with $7$ and $29$, so this is another set of values which won't work for you.
Consider more generally where $q$ and $2dq + 1$ are prime, for some fixed integer $d gt 2$. Using analysis similar to what I've done above will result in at least relatively stringent requirements (especially for smaller $d$) which may allow many values to work, but I suspect there will also be quite a few cases that don't, especially for larger $q$. As such, unfortunately, it seems there are a quite few other types of primes, other than just those associated with Sophie Germain ones, that won't work with your algorithm.
$endgroup$
$begingroup$
Take a look at p=11 to see that ALL ten must be checked--there are NO duplicates for the p=a+b since a and b have different positions in the formula. Begin with 1 and 10 to get 21 and 111; 2 and 9 to get 31 and 101; 3 and 8 to get 41 and 91; 4 and 7 to get 51 and 81; 5 and 6 to get 61 and 71. NO duplicates result. I'll check your remark about Germain primes.
$endgroup$
– J. M. Bergot
Jan 7 at 0:06
$begingroup$
@J.M.Bergot I agree that ALL ten must be checked. I just stated you did not check both $ap + b$ and $bp + a$ as the set of values which $ap + b$ generates is the same as $bp + a$, just in the opposite order. With $p = 11$, if you check both, there will be $20$ values to check, but only $10$ of them. However, I see what you're doing now. You assume that $a lt b$, which you didn't state. This is basically the same as what I did, except that the values are checked in a somewhat different order, but the set of values themselves are still the same.
$endgroup$
– John Omielan
Jan 7 at 0:08
$begingroup$
Yes, we agree that there will be p-1 different terms produced. I am at a public library and am NOT used to thinking when others are around-->leads to mistakes. I did some figuring with a humble calculator but did not look for Germain primes. Maybe none were found; I didn't bring my notes. I bit of a puzzle would be to find what primes produced can be found in many,many different ways depending on a variety of p's. A computer could be used as an electric space heater for winter work.
$endgroup$
– J. M. Bergot
Jan 7 at 0:13
$begingroup$
The next Sophie Germain prime is $11$, with $23 = 2 times 11 + 1$, which I noticed was the next prime not produced when I manually checked your algorithm. You can verify this yourself fairly easily, including the next one or two Sophie Germain primes of $23$ (so check $47$) and $29$ (so check $59$). Note I haven't checked to see if any other types of primes are missed, but there may be.
$endgroup$
– John Omielan
Jan 7 at 0:16
$begingroup$
I keep forgetting to use this gizmo.. I sent this into primepuzzles.net to see if anyone wants to experiment to find primes not to be found. If there are others beside Germains, then something new has been found. The library closes soon-->I'll leave for the day. ThaNXXX FOR YOUR W ORK..
$endgroup$
– J. M. Bergot
Jan 7 at 0:22
|
show 7 more comments
$begingroup$
If I understand what you're asking correctly, then the answer to your main question is almost definitely no, there is no maximum prime that will not be found. First, let me state a few things I am assuming here. First, the $a$ and $b$ are meant to be non-negative integers. Second, note that you don't need to check both $ap + b$ and $bp + a$ since if $p = a + b$, then $p = b + a$ also, so each check would be duplicated. As such, I will just only consider all possible $ap + b$. Replacing $b$ with $p - a$ gives
$$ap + left(p - aright) = left(a + 1right)p - left(a + 1right) + 1 tag{1}label{eq1}$$
Now, you are asking to check for $a$ going from $1$ to $p - 1$, inclusive. I will replace $a + 1$ with $c$, with it going from $2$ to $p$, inclusive, to get
$$cp - c + 1 = cleft(p - 1right) + 1 tag{2}label{eq2}$$
Among the primes to check, consider the Sophie Germain primes, i.e., which are primes $q$ where $2q + 1$ is also a prime. Assume there is a $c ge 2$ and $p$ which allows eqref{eq2} to be equal to $2q + 1$. This then gives
$$2q + 1 = cleft(p - 1right) + 1 tag{3}label{eq3}$$
which simplifies to
$$2q = cleft(p - 1right) tag{4}label{eq4}$$
Now, if $p = 2$, then $2q = c$, but $2 le c le p$, so $c = 2$ is the only value, resulting in $q = 1$, which is not prime. For $p gt 2$, $p$ is odd and so must be of the form $2n + 1$ for some positive integer $n$. Thus, $p - 1 = 2n$, with eqref{eq4} now becoming
$$q = cn tag{5}label{eq5}$$
However, with $q$ being a prime, then $q = c$ and $n = 1$, or $q = n$ and $c = 1$. Since $c ge 2$, as stated earlier, this requires that $c = q$ and $n = 1$. This means that just $p = 3$ can possibly work, giving the only Sophie Germain primes your algorithm creates being $2$, with $5 = 3 times 1 + 2$, plus $3$, with $7 = 3 times 2 + 1$. All other primes coming from Sophie Germain primes, starting with $5$ where $11 = 2 times 5 + 1$ as you have noticed yourself, will not work!
It's an unproven conjecture that there are an infinite # of Sophie Germain primes. However, I believe it's likely true as it would be an very unusual property of primes, IMHO, for the set of these primes to be finite.
There also other types of primes which generally will not work. Consider, for example, where both $q$ and $4q + 1$ are primes. I'm not aware of any general name for these types of primes. Anyway, eqref{eq5} then becomes
$$2q = cn tag{6}label{eq6}$$
As before, $q$ must divide $c$ or $n$. If it divides $c$, then $c = q$ and $n = 2$, which means $p = 5$, with the only $q$ which works being $3$, giving the prime to create being $13 = 4 times 3 + 1$ and, from your algorithm, $13 = 2 times 5 + 3$. If $q$ doesn't divide $c$, then it must divide $n$, so $q = n$ and $c = 2$. However, this means that $p = 2n + 1 = 2q + 1$. But this can't be true in general as it means that $q$, $2q + 1$ and $4q + 1$ must all be prime simultaneously. To see this, if $q$ is not $3$, then $q equiv 1 pmod 3$ (with $2q + 1 equiv 0 pmod 3$ in this case) or $q equiv 2 pmod 3$ (with $4q + 1 equiv 0 pmod 3$ in this other case). As such, only $q = 3$ works. There are also undoubtedly an infinite number of cases where both $q$ and $4q + 1$ are prime, starting with $7$ and $29$, so this is another set of values which won't work for you.
Consider more generally where $q$ and $2dq + 1$ are prime, for some fixed integer $d gt 2$. Using analysis similar to what I've done above will result in at least relatively stringent requirements (especially for smaller $d$) which may allow many values to work, but I suspect there will also be quite a few cases that don't, especially for larger $q$. As such, unfortunately, it seems there are a quite few other types of primes, other than just those associated with Sophie Germain ones, that won't work with your algorithm.
$endgroup$
If I understand what you're asking correctly, then the answer to your main question is almost definitely no, there is no maximum prime that will not be found. First, let me state a few things I am assuming here. First, the $a$ and $b$ are meant to be non-negative integers. Second, note that you don't need to check both $ap + b$ and $bp + a$ since if $p = a + b$, then $p = b + a$ also, so each check would be duplicated. As such, I will just only consider all possible $ap + b$. Replacing $b$ with $p - a$ gives
$$ap + left(p - aright) = left(a + 1right)p - left(a + 1right) + 1 tag{1}label{eq1}$$
Now, you are asking to check for $a$ going from $1$ to $p - 1$, inclusive. I will replace $a + 1$ with $c$, with it going from $2$ to $p$, inclusive, to get
$$cp - c + 1 = cleft(p - 1right) + 1 tag{2}label{eq2}$$
Among the primes to check, consider the Sophie Germain primes, i.e., which are primes $q$ where $2q + 1$ is also a prime. Assume there is a $c ge 2$ and $p$ which allows eqref{eq2} to be equal to $2q + 1$. This then gives
$$2q + 1 = cleft(p - 1right) + 1 tag{3}label{eq3}$$
which simplifies to
$$2q = cleft(p - 1right) tag{4}label{eq4}$$
Now, if $p = 2$, then $2q = c$, but $2 le c le p$, so $c = 2$ is the only value, resulting in $q = 1$, which is not prime. For $p gt 2$, $p$ is odd and so must be of the form $2n + 1$ for some positive integer $n$. Thus, $p - 1 = 2n$, with eqref{eq4} now becoming
$$q = cn tag{5}label{eq5}$$
However, with $q$ being a prime, then $q = c$ and $n = 1$, or $q = n$ and $c = 1$. Since $c ge 2$, as stated earlier, this requires that $c = q$ and $n = 1$. This means that just $p = 3$ can possibly work, giving the only Sophie Germain primes your algorithm creates being $2$, with $5 = 3 times 1 + 2$, plus $3$, with $7 = 3 times 2 + 1$. All other primes coming from Sophie Germain primes, starting with $5$ where $11 = 2 times 5 + 1$ as you have noticed yourself, will not work!
It's an unproven conjecture that there are an infinite # of Sophie Germain primes. However, I believe it's likely true as it would be an very unusual property of primes, IMHO, for the set of these primes to be finite.
There also other types of primes which generally will not work. Consider, for example, where both $q$ and $4q + 1$ are primes. I'm not aware of any general name for these types of primes. Anyway, eqref{eq5} then becomes
$$2q = cn tag{6}label{eq6}$$
As before, $q$ must divide $c$ or $n$. If it divides $c$, then $c = q$ and $n = 2$, which means $p = 5$, with the only $q$ which works being $3$, giving the prime to create being $13 = 4 times 3 + 1$ and, from your algorithm, $13 = 2 times 5 + 3$. If $q$ doesn't divide $c$, then it must divide $n$, so $q = n$ and $c = 2$. However, this means that $p = 2n + 1 = 2q + 1$. But this can't be true in general as it means that $q$, $2q + 1$ and $4q + 1$ must all be prime simultaneously. To see this, if $q$ is not $3$, then $q equiv 1 pmod 3$ (with $2q + 1 equiv 0 pmod 3$ in this case) or $q equiv 2 pmod 3$ (with $4q + 1 equiv 0 pmod 3$ in this other case). As such, only $q = 3$ works. There are also undoubtedly an infinite number of cases where both $q$ and $4q + 1$ are prime, starting with $7$ and $29$, so this is another set of values which won't work for you.
Consider more generally where $q$ and $2dq + 1$ are prime, for some fixed integer $d gt 2$. Using analysis similar to what I've done above will result in at least relatively stringent requirements (especially for smaller $d$) which may allow many values to work, but I suspect there will also be quite a few cases that don't, especially for larger $q$. As such, unfortunately, it seems there are a quite few other types of primes, other than just those associated with Sophie Germain ones, that won't work with your algorithm.
edited Jan 7 at 11:09
answered Jan 6 at 23:33
John OmielanJohn Omielan
2,641212
2,641212
$begingroup$
Take a look at p=11 to see that ALL ten must be checked--there are NO duplicates for the p=a+b since a and b have different positions in the formula. Begin with 1 and 10 to get 21 and 111; 2 and 9 to get 31 and 101; 3 and 8 to get 41 and 91; 4 and 7 to get 51 and 81; 5 and 6 to get 61 and 71. NO duplicates result. I'll check your remark about Germain primes.
$endgroup$
– J. M. Bergot
Jan 7 at 0:06
$begingroup$
@J.M.Bergot I agree that ALL ten must be checked. I just stated you did not check both $ap + b$ and $bp + a$ as the set of values which $ap + b$ generates is the same as $bp + a$, just in the opposite order. With $p = 11$, if you check both, there will be $20$ values to check, but only $10$ of them. However, I see what you're doing now. You assume that $a lt b$, which you didn't state. This is basically the same as what I did, except that the values are checked in a somewhat different order, but the set of values themselves are still the same.
$endgroup$
– John Omielan
Jan 7 at 0:08
$begingroup$
Yes, we agree that there will be p-1 different terms produced. I am at a public library and am NOT used to thinking when others are around-->leads to mistakes. I did some figuring with a humble calculator but did not look for Germain primes. Maybe none were found; I didn't bring my notes. I bit of a puzzle would be to find what primes produced can be found in many,many different ways depending on a variety of p's. A computer could be used as an electric space heater for winter work.
$endgroup$
– J. M. Bergot
Jan 7 at 0:13
$begingroup$
The next Sophie Germain prime is $11$, with $23 = 2 times 11 + 1$, which I noticed was the next prime not produced when I manually checked your algorithm. You can verify this yourself fairly easily, including the next one or two Sophie Germain primes of $23$ (so check $47$) and $29$ (so check $59$). Note I haven't checked to see if any other types of primes are missed, but there may be.
$endgroup$
– John Omielan
Jan 7 at 0:16
$begingroup$
I keep forgetting to use this gizmo.. I sent this into primepuzzles.net to see if anyone wants to experiment to find primes not to be found. If there are others beside Germains, then something new has been found. The library closes soon-->I'll leave for the day. ThaNXXX FOR YOUR W ORK..
$endgroup$
– J. M. Bergot
Jan 7 at 0:22
|
show 7 more comments
$begingroup$
Take a look at p=11 to see that ALL ten must be checked--there are NO duplicates for the p=a+b since a and b have different positions in the formula. Begin with 1 and 10 to get 21 and 111; 2 and 9 to get 31 and 101; 3 and 8 to get 41 and 91; 4 and 7 to get 51 and 81; 5 and 6 to get 61 and 71. NO duplicates result. I'll check your remark about Germain primes.
$endgroup$
– J. M. Bergot
Jan 7 at 0:06
$begingroup$
@J.M.Bergot I agree that ALL ten must be checked. I just stated you did not check both $ap + b$ and $bp + a$ as the set of values which $ap + b$ generates is the same as $bp + a$, just in the opposite order. With $p = 11$, if you check both, there will be $20$ values to check, but only $10$ of them. However, I see what you're doing now. You assume that $a lt b$, which you didn't state. This is basically the same as what I did, except that the values are checked in a somewhat different order, but the set of values themselves are still the same.
$endgroup$
– John Omielan
Jan 7 at 0:08
$begingroup$
Yes, we agree that there will be p-1 different terms produced. I am at a public library and am NOT used to thinking when others are around-->leads to mistakes. I did some figuring with a humble calculator but did not look for Germain primes. Maybe none were found; I didn't bring my notes. I bit of a puzzle would be to find what primes produced can be found in many,many different ways depending on a variety of p's. A computer could be used as an electric space heater for winter work.
$endgroup$
– J. M. Bergot
Jan 7 at 0:13
$begingroup$
The next Sophie Germain prime is $11$, with $23 = 2 times 11 + 1$, which I noticed was the next prime not produced when I manually checked your algorithm. You can verify this yourself fairly easily, including the next one or two Sophie Germain primes of $23$ (so check $47$) and $29$ (so check $59$). Note I haven't checked to see if any other types of primes are missed, but there may be.
$endgroup$
– John Omielan
Jan 7 at 0:16
$begingroup$
I keep forgetting to use this gizmo.. I sent this into primepuzzles.net to see if anyone wants to experiment to find primes not to be found. If there are others beside Germains, then something new has been found. The library closes soon-->I'll leave for the day. ThaNXXX FOR YOUR W ORK..
$endgroup$
– J. M. Bergot
Jan 7 at 0:22
$begingroup$
Take a look at p=11 to see that ALL ten must be checked--there are NO duplicates for the p=a+b since a and b have different positions in the formula. Begin with 1 and 10 to get 21 and 111; 2 and 9 to get 31 and 101; 3 and 8 to get 41 and 91; 4 and 7 to get 51 and 81; 5 and 6 to get 61 and 71. NO duplicates result. I'll check your remark about Germain primes.
$endgroup$
– J. M. Bergot
Jan 7 at 0:06
$begingroup$
Take a look at p=11 to see that ALL ten must be checked--there are NO duplicates for the p=a+b since a and b have different positions in the formula. Begin with 1 and 10 to get 21 and 111; 2 and 9 to get 31 and 101; 3 and 8 to get 41 and 91; 4 and 7 to get 51 and 81; 5 and 6 to get 61 and 71. NO duplicates result. I'll check your remark about Germain primes.
$endgroup$
– J. M. Bergot
Jan 7 at 0:06
$begingroup$
@J.M.Bergot I agree that ALL ten must be checked. I just stated you did not check both $ap + b$ and $bp + a$ as the set of values which $ap + b$ generates is the same as $bp + a$, just in the opposite order. With $p = 11$, if you check both, there will be $20$ values to check, but only $10$ of them. However, I see what you're doing now. You assume that $a lt b$, which you didn't state. This is basically the same as what I did, except that the values are checked in a somewhat different order, but the set of values themselves are still the same.
$endgroup$
– John Omielan
Jan 7 at 0:08
$begingroup$
@J.M.Bergot I agree that ALL ten must be checked. I just stated you did not check both $ap + b$ and $bp + a$ as the set of values which $ap + b$ generates is the same as $bp + a$, just in the opposite order. With $p = 11$, if you check both, there will be $20$ values to check, but only $10$ of them. However, I see what you're doing now. You assume that $a lt b$, which you didn't state. This is basically the same as what I did, except that the values are checked in a somewhat different order, but the set of values themselves are still the same.
$endgroup$
– John Omielan
Jan 7 at 0:08
$begingroup$
Yes, we agree that there will be p-1 different terms produced. I am at a public library and am NOT used to thinking when others are around-->leads to mistakes. I did some figuring with a humble calculator but did not look for Germain primes. Maybe none were found; I didn't bring my notes. I bit of a puzzle would be to find what primes produced can be found in many,many different ways depending on a variety of p's. A computer could be used as an electric space heater for winter work.
$endgroup$
– J. M. Bergot
Jan 7 at 0:13
$begingroup$
Yes, we agree that there will be p-1 different terms produced. I am at a public library and am NOT used to thinking when others are around-->leads to mistakes. I did some figuring with a humble calculator but did not look for Germain primes. Maybe none were found; I didn't bring my notes. I bit of a puzzle would be to find what primes produced can be found in many,many different ways depending on a variety of p's. A computer could be used as an electric space heater for winter work.
$endgroup$
– J. M. Bergot
Jan 7 at 0:13
$begingroup$
The next Sophie Germain prime is $11$, with $23 = 2 times 11 + 1$, which I noticed was the next prime not produced when I manually checked your algorithm. You can verify this yourself fairly easily, including the next one or two Sophie Germain primes of $23$ (so check $47$) and $29$ (so check $59$). Note I haven't checked to see if any other types of primes are missed, but there may be.
$endgroup$
– John Omielan
Jan 7 at 0:16
$begingroup$
The next Sophie Germain prime is $11$, with $23 = 2 times 11 + 1$, which I noticed was the next prime not produced when I manually checked your algorithm. You can verify this yourself fairly easily, including the next one or two Sophie Germain primes of $23$ (so check $47$) and $29$ (so check $59$). Note I haven't checked to see if any other types of primes are missed, but there may be.
$endgroup$
– John Omielan
Jan 7 at 0:16
$begingroup$
I keep forgetting to use this gizmo.. I sent this into primepuzzles.net to see if anyone wants to experiment to find primes not to be found. If there are others beside Germains, then something new has been found. The library closes soon-->I'll leave for the day. ThaNXXX FOR YOUR W ORK..
$endgroup$
– J. M. Bergot
Jan 7 at 0:22
$begingroup$
I keep forgetting to use this gizmo.. I sent this into primepuzzles.net to see if anyone wants to experiment to find primes not to be found. If there are others beside Germains, then something new has been found. The library closes soon-->I'll leave for the day. ThaNXXX FOR YOUR W ORK..
$endgroup$
– J. M. Bergot
Jan 7 at 0:22
|
show 7 more comments
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%2f3064410%2ffor-a0-prime-p-ab-and-p-cdot-ab-and-p-cdot-ba-gives-all-primes%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
2
$begingroup$
I don't understand. Are you fixing $p$? Are you fixing $p$ as well as $a$ and $b$? In either case, you only get a finite number of numbers out of $ap+b$ or $bp+a$. Did you mean to write something like $ak+b$ or $pk+b$ where $k$ is allowed to vary over the integers? (or another option, do you fix $p$, allow $a$ and $b$ to vary over all the integers, not just positive ones?)
$endgroup$
– Ovi
Jan 6 at 21:45
$begingroup$
@Ovi So indeed "all but a few primes will not be found" ...
$endgroup$
– Hagen von Eitzen
Jan 6 at 21:53
$begingroup$
Continuing with all partitions of 11: 1+10, 2+9, 3+8, 4+7, and 5+6; these pairs are now the pairs a +b and p=11 for the ten numbers to be found. When p=13, the pairs to be tested are 1+12, 2+11, 3+10, 4+9, 5+8, and 6+7 to give 13-1=12 new numbers to be tested. Of course, repetitions do occur from different primes. What will be the largest prime NOT found by this method? I did not find 11.
$endgroup$
– J. M. Bergot
Jan 6 at 21:55
$begingroup$
@HagenvonEitzen I think, under the most straightforward interpretation, all but a few primes will not be found.
$endgroup$
– Ovi
Jan 6 at 21:55
2
$begingroup$
Do some experiments to see how many are prime as p increases.
$endgroup$
– J. M. Bergot
Jan 6 at 22:25