Smallest PRIME containing the first 11 primes as sub-stringsSmallest number containing the first 11 primes as sub-stringsThe tilted labyrinth - Can you find the fastest path in this 3D-puzzle? (Simulator now included.)The magic of the primesWhat is the smallest rectangle containing the squares of 1 through 100?Professor Halfbrain and the prime numbersA Number Game for your SoulTo Plunder Treasure IslandsSmallest number containing the first 11 primes as sub-stringsSmallest prime number which when spelt out contains the letters P, R, I, M, EThe first 10 prime butterflies
Shall we use log(diff(x)) or diff(log(x))?
Is it possible to reach master level without studing theory?
What would happen if the Queen died immediately before a general election?
Should a soda bottle be stored horizontally or vertically?
Where is the Windows license key on win 10?
One of my friends deposited £42 into my account that he had borrowed previously. Will it affect my UK visa application?
Is there any specific reason why Delta Air Lines doesn't have its own callsign?
Why are the Londoners so excited in the hunt without feeling the horror of war?
Is this DIN connector suited for MIDI devices?
Germany's Ladenschlussgesetz in comparison to Israel's business laws about the Sabbath
Why does the takeoff N1 limit start to decrease below 30°C OAT?
Does an action-reaction pair always contain the same kind of force?
Can I cast Kheru Spellsnatcher's spell after it leaves the battlefield?
Computer power supplies usually have higher efficiency on 230V than on 115V. Why?
In OOP, 'protected' keyword is not required?
Harmonic sums and elementary number theory
How to test whether a correlation is equal to 1?
How did the Riddler get his devices to Two-Face's molls in the first place?
How to educate bachelor and master exchange students from Asia?
Learn university maths or train for high school competitions: which is better?
How to reuse a component in different pages in SXA?
QGIS WMS/WMST referer
Is the .wav file created from a .mp3 file has better quality than the .mp3 file itself?
Why only sine waves?
Smallest PRIME containing the first 11 primes as sub-strings
Smallest number containing the first 11 primes as sub-stringsThe tilted labyrinth - Can you find the fastest path in this 3D-puzzle? (Simulator now included.)The magic of the primesWhat is the smallest rectangle containing the squares of 1 through 100?Professor Halfbrain and the prime numbersA Number Game for your SoulTo Plunder Treasure IslandsSmallest number containing the first 11 primes as sub-stringsSmallest prime number which when spelt out contains the letters P, R, I, M, EThe first 10 prime butterflies
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
.everyonelovesstackoverflowposition:absolute;height:1px;width:1px;opacity:0;top:0;left:0;pointer-events:none;
$begingroup$
In Smallest number containing the first 11 primes as sub-strings, @Alconja successfully found the smallest number which contains the first eleven primes (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31) as concatenated sub-strings. This inspired me to propose the following followup:
What is the smallest prime which contains each of the first eleven primes as a sub-string?
Obviously the answer is at least
113,171,923,295,
but that's not prime. How much further do we need to go?
Disclaimer: I don't know the answer myself. I'm hoping it won't need a computer to find ...
mathematics optimization number-theory
$endgroup$
|
show 5 more comments
$begingroup$
In Smallest number containing the first 11 primes as sub-strings, @Alconja successfully found the smallest number which contains the first eleven primes (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31) as concatenated sub-strings. This inspired me to propose the following followup:
What is the smallest prime which contains each of the first eleven primes as a sub-string?
Obviously the answer is at least
113,171,923,295,
but that's not prime. How much further do we need to go?
Disclaimer: I don't know the answer myself. I'm hoping it won't need a computer to find ...
mathematics optimization number-theory
$endgroup$
3
$begingroup$
This seems like it will be very difficult to do without a computer
$endgroup$
– Cruncher
Sep 23 at 18:09
3
$begingroup$
How do you find any prime greater than the spoiler value without using a computer?
$endgroup$
– Weather Vane
Sep 23 at 18:14
$begingroup$
@WeatherVane I compared my guesses to an already calculated List of primes. It was probably done with a computer, but not by me.
$endgroup$
– Darrel Hoffman
Sep 23 at 18:38
6
$begingroup$
We should calculate the first N of these and submit it to the OEIS. I'll start: 2, 23, 253, 2357, 211573, 511327, 1135217... (trial and error on these, might not be all correct)
$endgroup$
– Darrel Hoffman
Sep 23 at 19:20
5
$begingroup$
@DarrelHoffman: 253 is 11 x 23. OEIS already has this sequence btw.
$endgroup$
– Benoit Esnard
Sep 24 at 9:29
|
show 5 more comments
$begingroup$
In Smallest number containing the first 11 primes as sub-strings, @Alconja successfully found the smallest number which contains the first eleven primes (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31) as concatenated sub-strings. This inspired me to propose the following followup:
What is the smallest prime which contains each of the first eleven primes as a sub-string?
Obviously the answer is at least
113,171,923,295,
but that's not prime. How much further do we need to go?
Disclaimer: I don't know the answer myself. I'm hoping it won't need a computer to find ...
mathematics optimization number-theory
$endgroup$
In Smallest number containing the first 11 primes as sub-strings, @Alconja successfully found the smallest number which contains the first eleven primes (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31) as concatenated sub-strings. This inspired me to propose the following followup:
What is the smallest prime which contains each of the first eleven primes as a sub-string?
Obviously the answer is at least
113,171,923,295,
but that's not prime. How much further do we need to go?
Disclaimer: I don't know the answer myself. I'm hoping it won't need a computer to find ...
mathematics optimization number-theory
mathematics optimization number-theory
asked Sep 23 at 18:01
Rand al'ThorRand al'Thor
89.9k18 gold badges253 silver badges513 bronze badges
89.9k18 gold badges253 silver badges513 bronze badges
3
$begingroup$
This seems like it will be very difficult to do without a computer
$endgroup$
– Cruncher
Sep 23 at 18:09
3
$begingroup$
How do you find any prime greater than the spoiler value without using a computer?
$endgroup$
– Weather Vane
Sep 23 at 18:14
$begingroup$
@WeatherVane I compared my guesses to an already calculated List of primes. It was probably done with a computer, but not by me.
$endgroup$
– Darrel Hoffman
Sep 23 at 18:38
6
$begingroup$
We should calculate the first N of these and submit it to the OEIS. I'll start: 2, 23, 253, 2357, 211573, 511327, 1135217... (trial and error on these, might not be all correct)
$endgroup$
– Darrel Hoffman
Sep 23 at 19:20
5
$begingroup$
@DarrelHoffman: 253 is 11 x 23. OEIS already has this sequence btw.
$endgroup$
– Benoit Esnard
Sep 24 at 9:29
|
show 5 more comments
3
$begingroup$
This seems like it will be very difficult to do without a computer
$endgroup$
– Cruncher
Sep 23 at 18:09
3
$begingroup$
How do you find any prime greater than the spoiler value without using a computer?
$endgroup$
– Weather Vane
Sep 23 at 18:14
$begingroup$
@WeatherVane I compared my guesses to an already calculated List of primes. It was probably done with a computer, but not by me.
$endgroup$
– Darrel Hoffman
Sep 23 at 18:38
6
$begingroup$
We should calculate the first N of these and submit it to the OEIS. I'll start: 2, 23, 253, 2357, 211573, 511327, 1135217... (trial and error on these, might not be all correct)
$endgroup$
– Darrel Hoffman
Sep 23 at 19:20
5
$begingroup$
@DarrelHoffman: 253 is 11 x 23. OEIS already has this sequence btw.
$endgroup$
– Benoit Esnard
Sep 24 at 9:29
3
3
$begingroup$
This seems like it will be very difficult to do without a computer
$endgroup$
– Cruncher
Sep 23 at 18:09
$begingroup$
This seems like it will be very difficult to do without a computer
$endgroup$
– Cruncher
Sep 23 at 18:09
3
3
$begingroup$
How do you find any prime greater than the spoiler value without using a computer?
$endgroup$
– Weather Vane
Sep 23 at 18:14
$begingroup$
How do you find any prime greater than the spoiler value without using a computer?
$endgroup$
– Weather Vane
Sep 23 at 18:14
$begingroup$
@WeatherVane I compared my guesses to an already calculated List of primes. It was probably done with a computer, but not by me.
$endgroup$
– Darrel Hoffman
Sep 23 at 18:38
$begingroup$
@WeatherVane I compared my guesses to an already calculated List of primes. It was probably done with a computer, but not by me.
$endgroup$
– Darrel Hoffman
Sep 23 at 18:38
6
6
$begingroup$
We should calculate the first N of these and submit it to the OEIS. I'll start: 2, 23, 253, 2357, 211573, 511327, 1135217... (trial and error on these, might not be all correct)
$endgroup$
– Darrel Hoffman
Sep 23 at 19:20
$begingroup$
We should calculate the first N of these and submit it to the OEIS. I'll start: 2, 23, 253, 2357, 211573, 511327, 1135217... (trial and error on these, might not be all correct)
$endgroup$
– Darrel Hoffman
Sep 23 at 19:20
5
5
$begingroup$
@DarrelHoffman: 253 is 11 x 23. OEIS already has this sequence btw.
$endgroup$
– Benoit Esnard
Sep 24 at 9:29
$begingroup$
@DarrelHoffman: 253 is 11 x 23. OEIS already has this sequence btw.
$endgroup$
– Benoit Esnard
Sep 24 at 9:29
|
show 5 more comments
4 Answers
4
active
oldest
votes
$begingroup$
The answer is
113,171,952,923
I wrote a Java program to find it:
The program uses brute force by starting with the lower bound obtained in the previous question (113,171,923,295) and finding the next prime that contains the required primes as substrings. It turns out that we only need to check 29628 possibilities, which is not many. Here is the program: https://pastebin.com/XQL6VGnc
$endgroup$
2
$begingroup$
I don't normally like answers which rely on computers, but you're the only one with the correct solution so far, so +1 :-) Will wait to accept in case anyone has a nice non-computerised method to find this.
$endgroup$
– Rand al'Thor
Sep 24 at 8:50
4
$begingroup$
Not great that you're using probable prime as a primality test
$endgroup$
– StefanS
Sep 24 at 10:05
1
$begingroup$
@StefanS yeah I was being a little lazy. Anyway it is very precise for small numbers and that many iterations. I checked that my final answer is actually prime.
$endgroup$
– Dmitry Kamenetsky
Sep 24 at 12:51
3
$begingroup$
@StefanS: Miller-Rabin with 20 iterations has a maximum error bound of 4 ** -20, or less than one in a trillion (and in practice, the accuracy is much better than that worst-case bound). Nothing wrong with using it for this; if you're paranoid, you can just add a second test for numbers that are both likely prime and contain the necessary substrings to raise the M-R iterations to 100 or something patently ridiculous.
$endgroup$
– ShadowRanger
Sep 24 at 20:20
add a comment
|
$begingroup$
(Kind of) analytical solution that only requires small amount of calculations, (potentially) doable by hand.
First step: we can safely drop 2, 3 and 7 from the equation as those digits are used in 23 and 17. Now, we need to build a prime from: 5, 11, 13, 17, 19, 23, 29 and 31.
Second step: let's try to build the shortest number possible from these numbers. To do this we need to maximize the number of overlaps.
To do this, let's build a graph of possible overlaps:

An edge from number A to number B means that A and B can overlap (e.g. 11 and 13 can combine into 113). 5 and 29 can't overlap with other numbers. Maximum number of overlaps is equivalent to the (totally) longest possible set of paths in the "main" clique.
After going through all the possible starting points (11, 13, 31 and 23) we find that the maximum number of overlaps is 3 and there're 10 possible sets of paths with this number of overlaps:
- 11 -> 13 -> 31 -> 17 = 11317
- 11 -> 13 -> 31 -> 19 = 11319
- 13 -> 31 -> 11 -> 17 = 13117
- 13 -> 31 -> 11 -> 19 = 13119
- 23 -> 31 -> 11 -> 17 = 23117
- 23 -> 31 -> 11 -> 19 = 23119
- 13 -> 31 -> 17 = 1317, 11 -> 19 = 119
- 13 -> 31 -> 19 = 1319, 11 -> 17 = 117
- 23 -> 31 -> 17 = 2317, 11 -> 19 = 119
- 23 -> 31 -> 19 = 2319, 11 -> 17 = 117
Corollary 1: Any prime number that can be represented as a permutation of one of these 10 sets of numbers (let's call it a candidate):
- 5, 29, 11317, 19, 23
- 5, 29, 11319, 17, 23
- 5, 29, 13117, 19, 23
- 5, 29, 13119, 17, 23
- 5, 29, 23117, 13, 19
- 5, 29, 23119, 13, 17
- 5, 29, 119, 1317, 23
- 5, 29, 117, 1319, 23
- 5, 29, 2317, 119, 13
- 5, 29, 2319, 117, 13
will be the shortest possible prime that contains the first 11 primes. If al least one candidate exist, the smallest of them will be the solution.
Corollary 2: if there are candidates that start with 11317 then the smallest of them will be the solution, as 11317 is the alphabetically smallest sequence among all presented.
Step three: Let's sort the first set in alphabetical order and then go through permutations one by one in increasing order until we find a prime number:
- 11317, 19, 23, 29, 5 - not a prime, 5 * 22634384659
- 11317, 19, 23, 5, 29 - not a prime, 7 * 16167417647
- 11317, 19, 29, 23, 5 - not a prime, 5 * 22634385847
- 11317, 19, 29, 5, 23 - not a prime, 59 * 1918168297
- 11317, 19, 5, 23, 29 - not a prime, 337 * 335821817
- 11317, 19, 5, 29, 23 - bingo!
The answer is: 113171952923.
P.S. Now, all of this looks horrible, but the only step that requires truly obscene amount of calculations is a primality test for 113171952923. If we can use a computer for that, we're good. We kind of got lucky that the answer is so close to the start of the search, though.
$endgroup$
4
$begingroup$
Nicely done! :-D
$endgroup$
– Rand al'Thor
Sep 24 at 15:03
$begingroup$
There is a typo: 1919 should read 1319. But that doesn't alter the reasoning.
$endgroup$
– Fred vdP
Sep 25 at 17:15
$begingroup$
@FredvdP Sharp eyes! Fixed that, thank you very much!
$endgroup$
– default locale
Sep 25 at 17:43
$begingroup$
The R functiongmp::isprimesays yes, in about 0.1 seconds of effort. Similar result from MATLAB'sfactor
$endgroup$
– Carl Witthoft
Sep 25 at 18:54
add a comment
|
$begingroup$
So I can't yet prove this is the smallest, but it's at least an upper bound:
113,175,192,329
Reasoning:
Obviously, we have to get that 5 away from the last digit or else it's a multiple of 5. But we can't break up the 29, 23, or 19 or we lose those primes. So I tried moving the 5 back a few digits. 113,171,923,529 is divisible by 7. 113,171,952,329 is divisible by 337. But 113,175,192,329 is prime. Might be able to improve on that with some other permutations...
$endgroup$
$begingroup$
Per @Dimitry's answer, your second candidate is indeed prime.
$endgroup$
– MooseBoys
Sep 24 at 3:35
2
$begingroup$
@MooseBoys The second candidate, as I read it, is 113,171,952,329. Dmitry's answer ends in 923.
$endgroup$
– Andrew Morton
Sep 24 at 8:37
add a comment
|
$begingroup$
Shuffling the sequence of 5 and the non- overlapping 19, 23, and 29 by trial and error produces:
113,172,923,519
$endgroup$
$begingroup$
I figured it could go smaller, just didn't have time to play around with it anymore...
$endgroup$
– Darrel Hoffman
Sep 23 at 19:10
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "559"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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/4.0/"u003ecc by-sa 4.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%2fpuzzling.stackexchange.com%2fquestions%2f89448%2fsmallest-prime-containing-the-first-11-primes-as-sub-strings%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The answer is
113,171,952,923
I wrote a Java program to find it:
The program uses brute force by starting with the lower bound obtained in the previous question (113,171,923,295) and finding the next prime that contains the required primes as substrings. It turns out that we only need to check 29628 possibilities, which is not many. Here is the program: https://pastebin.com/XQL6VGnc
$endgroup$
2
$begingroup$
I don't normally like answers which rely on computers, but you're the only one with the correct solution so far, so +1 :-) Will wait to accept in case anyone has a nice non-computerised method to find this.
$endgroup$
– Rand al'Thor
Sep 24 at 8:50
4
$begingroup$
Not great that you're using probable prime as a primality test
$endgroup$
– StefanS
Sep 24 at 10:05
1
$begingroup$
@StefanS yeah I was being a little lazy. Anyway it is very precise for small numbers and that many iterations. I checked that my final answer is actually prime.
$endgroup$
– Dmitry Kamenetsky
Sep 24 at 12:51
3
$begingroup$
@StefanS: Miller-Rabin with 20 iterations has a maximum error bound of 4 ** -20, or less than one in a trillion (and in practice, the accuracy is much better than that worst-case bound). Nothing wrong with using it for this; if you're paranoid, you can just add a second test for numbers that are both likely prime and contain the necessary substrings to raise the M-R iterations to 100 or something patently ridiculous.
$endgroup$
– ShadowRanger
Sep 24 at 20:20
add a comment
|
$begingroup$
The answer is
113,171,952,923
I wrote a Java program to find it:
The program uses brute force by starting with the lower bound obtained in the previous question (113,171,923,295) and finding the next prime that contains the required primes as substrings. It turns out that we only need to check 29628 possibilities, which is not many. Here is the program: https://pastebin.com/XQL6VGnc
$endgroup$
2
$begingroup$
I don't normally like answers which rely on computers, but you're the only one with the correct solution so far, so +1 :-) Will wait to accept in case anyone has a nice non-computerised method to find this.
$endgroup$
– Rand al'Thor
Sep 24 at 8:50
4
$begingroup$
Not great that you're using probable prime as a primality test
$endgroup$
– StefanS
Sep 24 at 10:05
1
$begingroup$
@StefanS yeah I was being a little lazy. Anyway it is very precise for small numbers and that many iterations. I checked that my final answer is actually prime.
$endgroup$
– Dmitry Kamenetsky
Sep 24 at 12:51
3
$begingroup$
@StefanS: Miller-Rabin with 20 iterations has a maximum error bound of 4 ** -20, or less than one in a trillion (and in practice, the accuracy is much better than that worst-case bound). Nothing wrong with using it for this; if you're paranoid, you can just add a second test for numbers that are both likely prime and contain the necessary substrings to raise the M-R iterations to 100 or something patently ridiculous.
$endgroup$
– ShadowRanger
Sep 24 at 20:20
add a comment
|
$begingroup$
The answer is
113,171,952,923
I wrote a Java program to find it:
The program uses brute force by starting with the lower bound obtained in the previous question (113,171,923,295) and finding the next prime that contains the required primes as substrings. It turns out that we only need to check 29628 possibilities, which is not many. Here is the program: https://pastebin.com/XQL6VGnc
$endgroup$
The answer is
113,171,952,923
I wrote a Java program to find it:
The program uses brute force by starting with the lower bound obtained in the previous question (113,171,923,295) and finding the next prime that contains the required primes as substrings. It turns out that we only need to check 29628 possibilities, which is not many. Here is the program: https://pastebin.com/XQL6VGnc
answered Sep 24 at 1:00
Dmitry KamenetskyDmitry Kamenetsky
4,9746 silver badges48 bronze badges
4,9746 silver badges48 bronze badges
2
$begingroup$
I don't normally like answers which rely on computers, but you're the only one with the correct solution so far, so +1 :-) Will wait to accept in case anyone has a nice non-computerised method to find this.
$endgroup$
– Rand al'Thor
Sep 24 at 8:50
4
$begingroup$
Not great that you're using probable prime as a primality test
$endgroup$
– StefanS
Sep 24 at 10:05
1
$begingroup$
@StefanS yeah I was being a little lazy. Anyway it is very precise for small numbers and that many iterations. I checked that my final answer is actually prime.
$endgroup$
– Dmitry Kamenetsky
Sep 24 at 12:51
3
$begingroup$
@StefanS: Miller-Rabin with 20 iterations has a maximum error bound of 4 ** -20, or less than one in a trillion (and in practice, the accuracy is much better than that worst-case bound). Nothing wrong with using it for this; if you're paranoid, you can just add a second test for numbers that are both likely prime and contain the necessary substrings to raise the M-R iterations to 100 or something patently ridiculous.
$endgroup$
– ShadowRanger
Sep 24 at 20:20
add a comment
|
2
$begingroup$
I don't normally like answers which rely on computers, but you're the only one with the correct solution so far, so +1 :-) Will wait to accept in case anyone has a nice non-computerised method to find this.
$endgroup$
– Rand al'Thor
Sep 24 at 8:50
4
$begingroup$
Not great that you're using probable prime as a primality test
$endgroup$
– StefanS
Sep 24 at 10:05
1
$begingroup$
@StefanS yeah I was being a little lazy. Anyway it is very precise for small numbers and that many iterations. I checked that my final answer is actually prime.
$endgroup$
– Dmitry Kamenetsky
Sep 24 at 12:51
3
$begingroup$
@StefanS: Miller-Rabin with 20 iterations has a maximum error bound of 4 ** -20, or less than one in a trillion (and in practice, the accuracy is much better than that worst-case bound). Nothing wrong with using it for this; if you're paranoid, you can just add a second test for numbers that are both likely prime and contain the necessary substrings to raise the M-R iterations to 100 or something patently ridiculous.
$endgroup$
– ShadowRanger
Sep 24 at 20:20
2
2
$begingroup$
I don't normally like answers which rely on computers, but you're the only one with the correct solution so far, so +1 :-) Will wait to accept in case anyone has a nice non-computerised method to find this.
$endgroup$
– Rand al'Thor
Sep 24 at 8:50
$begingroup$
I don't normally like answers which rely on computers, but you're the only one with the correct solution so far, so +1 :-) Will wait to accept in case anyone has a nice non-computerised method to find this.
$endgroup$
– Rand al'Thor
Sep 24 at 8:50
4
4
$begingroup$
Not great that you're using probable prime as a primality test
$endgroup$
– StefanS
Sep 24 at 10:05
$begingroup$
Not great that you're using probable prime as a primality test
$endgroup$
– StefanS
Sep 24 at 10:05
1
1
$begingroup$
@StefanS yeah I was being a little lazy. Anyway it is very precise for small numbers and that many iterations. I checked that my final answer is actually prime.
$endgroup$
– Dmitry Kamenetsky
Sep 24 at 12:51
$begingroup$
@StefanS yeah I was being a little lazy. Anyway it is very precise for small numbers and that many iterations. I checked that my final answer is actually prime.
$endgroup$
– Dmitry Kamenetsky
Sep 24 at 12:51
3
3
$begingroup$
@StefanS: Miller-Rabin with 20 iterations has a maximum error bound of 4 ** -20, or less than one in a trillion (and in practice, the accuracy is much better than that worst-case bound). Nothing wrong with using it for this; if you're paranoid, you can just add a second test for numbers that are both likely prime and contain the necessary substrings to raise the M-R iterations to 100 or something patently ridiculous.
$endgroup$
– ShadowRanger
Sep 24 at 20:20
$begingroup$
@StefanS: Miller-Rabin with 20 iterations has a maximum error bound of 4 ** -20, or less than one in a trillion (and in practice, the accuracy is much better than that worst-case bound). Nothing wrong with using it for this; if you're paranoid, you can just add a second test for numbers that are both likely prime and contain the necessary substrings to raise the M-R iterations to 100 or something patently ridiculous.
$endgroup$
– ShadowRanger
Sep 24 at 20:20
add a comment
|
$begingroup$
(Kind of) analytical solution that only requires small amount of calculations, (potentially) doable by hand.
First step: we can safely drop 2, 3 and 7 from the equation as those digits are used in 23 and 17. Now, we need to build a prime from: 5, 11, 13, 17, 19, 23, 29 and 31.
Second step: let's try to build the shortest number possible from these numbers. To do this we need to maximize the number of overlaps.
To do this, let's build a graph of possible overlaps:

An edge from number A to number B means that A and B can overlap (e.g. 11 and 13 can combine into 113). 5 and 29 can't overlap with other numbers. Maximum number of overlaps is equivalent to the (totally) longest possible set of paths in the "main" clique.
After going through all the possible starting points (11, 13, 31 and 23) we find that the maximum number of overlaps is 3 and there're 10 possible sets of paths with this number of overlaps:
- 11 -> 13 -> 31 -> 17 = 11317
- 11 -> 13 -> 31 -> 19 = 11319
- 13 -> 31 -> 11 -> 17 = 13117
- 13 -> 31 -> 11 -> 19 = 13119
- 23 -> 31 -> 11 -> 17 = 23117
- 23 -> 31 -> 11 -> 19 = 23119
- 13 -> 31 -> 17 = 1317, 11 -> 19 = 119
- 13 -> 31 -> 19 = 1319, 11 -> 17 = 117
- 23 -> 31 -> 17 = 2317, 11 -> 19 = 119
- 23 -> 31 -> 19 = 2319, 11 -> 17 = 117
Corollary 1: Any prime number that can be represented as a permutation of one of these 10 sets of numbers (let's call it a candidate):
- 5, 29, 11317, 19, 23
- 5, 29, 11319, 17, 23
- 5, 29, 13117, 19, 23
- 5, 29, 13119, 17, 23
- 5, 29, 23117, 13, 19
- 5, 29, 23119, 13, 17
- 5, 29, 119, 1317, 23
- 5, 29, 117, 1319, 23
- 5, 29, 2317, 119, 13
- 5, 29, 2319, 117, 13
will be the shortest possible prime that contains the first 11 primes. If al least one candidate exist, the smallest of them will be the solution.
Corollary 2: if there are candidates that start with 11317 then the smallest of them will be the solution, as 11317 is the alphabetically smallest sequence among all presented.
Step three: Let's sort the first set in alphabetical order and then go through permutations one by one in increasing order until we find a prime number:
- 11317, 19, 23, 29, 5 - not a prime, 5 * 22634384659
- 11317, 19, 23, 5, 29 - not a prime, 7 * 16167417647
- 11317, 19, 29, 23, 5 - not a prime, 5 * 22634385847
- 11317, 19, 29, 5, 23 - not a prime, 59 * 1918168297
- 11317, 19, 5, 23, 29 - not a prime, 337 * 335821817
- 11317, 19, 5, 29, 23 - bingo!
The answer is: 113171952923.
P.S. Now, all of this looks horrible, but the only step that requires truly obscene amount of calculations is a primality test for 113171952923. If we can use a computer for that, we're good. We kind of got lucky that the answer is so close to the start of the search, though.
$endgroup$
4
$begingroup$
Nicely done! :-D
$endgroup$
– Rand al'Thor
Sep 24 at 15:03
$begingroup$
There is a typo: 1919 should read 1319. But that doesn't alter the reasoning.
$endgroup$
– Fred vdP
Sep 25 at 17:15
$begingroup$
@FredvdP Sharp eyes! Fixed that, thank you very much!
$endgroup$
– default locale
Sep 25 at 17:43
$begingroup$
The R functiongmp::isprimesays yes, in about 0.1 seconds of effort. Similar result from MATLAB'sfactor
$endgroup$
– Carl Witthoft
Sep 25 at 18:54
add a comment
|
$begingroup$
(Kind of) analytical solution that only requires small amount of calculations, (potentially) doable by hand.
First step: we can safely drop 2, 3 and 7 from the equation as those digits are used in 23 and 17. Now, we need to build a prime from: 5, 11, 13, 17, 19, 23, 29 and 31.
Second step: let's try to build the shortest number possible from these numbers. To do this we need to maximize the number of overlaps.
To do this, let's build a graph of possible overlaps:

An edge from number A to number B means that A and B can overlap (e.g. 11 and 13 can combine into 113). 5 and 29 can't overlap with other numbers. Maximum number of overlaps is equivalent to the (totally) longest possible set of paths in the "main" clique.
After going through all the possible starting points (11, 13, 31 and 23) we find that the maximum number of overlaps is 3 and there're 10 possible sets of paths with this number of overlaps:
- 11 -> 13 -> 31 -> 17 = 11317
- 11 -> 13 -> 31 -> 19 = 11319
- 13 -> 31 -> 11 -> 17 = 13117
- 13 -> 31 -> 11 -> 19 = 13119
- 23 -> 31 -> 11 -> 17 = 23117
- 23 -> 31 -> 11 -> 19 = 23119
- 13 -> 31 -> 17 = 1317, 11 -> 19 = 119
- 13 -> 31 -> 19 = 1319, 11 -> 17 = 117
- 23 -> 31 -> 17 = 2317, 11 -> 19 = 119
- 23 -> 31 -> 19 = 2319, 11 -> 17 = 117
Corollary 1: Any prime number that can be represented as a permutation of one of these 10 sets of numbers (let's call it a candidate):
- 5, 29, 11317, 19, 23
- 5, 29, 11319, 17, 23
- 5, 29, 13117, 19, 23
- 5, 29, 13119, 17, 23
- 5, 29, 23117, 13, 19
- 5, 29, 23119, 13, 17
- 5, 29, 119, 1317, 23
- 5, 29, 117, 1319, 23
- 5, 29, 2317, 119, 13
- 5, 29, 2319, 117, 13
will be the shortest possible prime that contains the first 11 primes. If al least one candidate exist, the smallest of them will be the solution.
Corollary 2: if there are candidates that start with 11317 then the smallest of them will be the solution, as 11317 is the alphabetically smallest sequence among all presented.
Step three: Let's sort the first set in alphabetical order and then go through permutations one by one in increasing order until we find a prime number:
- 11317, 19, 23, 29, 5 - not a prime, 5 * 22634384659
- 11317, 19, 23, 5, 29 - not a prime, 7 * 16167417647
- 11317, 19, 29, 23, 5 - not a prime, 5 * 22634385847
- 11317, 19, 29, 5, 23 - not a prime, 59 * 1918168297
- 11317, 19, 5, 23, 29 - not a prime, 337 * 335821817
- 11317, 19, 5, 29, 23 - bingo!
The answer is: 113171952923.
P.S. Now, all of this looks horrible, but the only step that requires truly obscene amount of calculations is a primality test for 113171952923. If we can use a computer for that, we're good. We kind of got lucky that the answer is so close to the start of the search, though.
$endgroup$
4
$begingroup$
Nicely done! :-D
$endgroup$
– Rand al'Thor
Sep 24 at 15:03
$begingroup$
There is a typo: 1919 should read 1319. But that doesn't alter the reasoning.
$endgroup$
– Fred vdP
Sep 25 at 17:15
$begingroup$
@FredvdP Sharp eyes! Fixed that, thank you very much!
$endgroup$
– default locale
Sep 25 at 17:43
$begingroup$
The R functiongmp::isprimesays yes, in about 0.1 seconds of effort. Similar result from MATLAB'sfactor
$endgroup$
– Carl Witthoft
Sep 25 at 18:54
add a comment
|
$begingroup$
(Kind of) analytical solution that only requires small amount of calculations, (potentially) doable by hand.
First step: we can safely drop 2, 3 and 7 from the equation as those digits are used in 23 and 17. Now, we need to build a prime from: 5, 11, 13, 17, 19, 23, 29 and 31.
Second step: let's try to build the shortest number possible from these numbers. To do this we need to maximize the number of overlaps.
To do this, let's build a graph of possible overlaps:

An edge from number A to number B means that A and B can overlap (e.g. 11 and 13 can combine into 113). 5 and 29 can't overlap with other numbers. Maximum number of overlaps is equivalent to the (totally) longest possible set of paths in the "main" clique.
After going through all the possible starting points (11, 13, 31 and 23) we find that the maximum number of overlaps is 3 and there're 10 possible sets of paths with this number of overlaps:
- 11 -> 13 -> 31 -> 17 = 11317
- 11 -> 13 -> 31 -> 19 = 11319
- 13 -> 31 -> 11 -> 17 = 13117
- 13 -> 31 -> 11 -> 19 = 13119
- 23 -> 31 -> 11 -> 17 = 23117
- 23 -> 31 -> 11 -> 19 = 23119
- 13 -> 31 -> 17 = 1317, 11 -> 19 = 119
- 13 -> 31 -> 19 = 1319, 11 -> 17 = 117
- 23 -> 31 -> 17 = 2317, 11 -> 19 = 119
- 23 -> 31 -> 19 = 2319, 11 -> 17 = 117
Corollary 1: Any prime number that can be represented as a permutation of one of these 10 sets of numbers (let's call it a candidate):
- 5, 29, 11317, 19, 23
- 5, 29, 11319, 17, 23
- 5, 29, 13117, 19, 23
- 5, 29, 13119, 17, 23
- 5, 29, 23117, 13, 19
- 5, 29, 23119, 13, 17
- 5, 29, 119, 1317, 23
- 5, 29, 117, 1319, 23
- 5, 29, 2317, 119, 13
- 5, 29, 2319, 117, 13
will be the shortest possible prime that contains the first 11 primes. If al least one candidate exist, the smallest of them will be the solution.
Corollary 2: if there are candidates that start with 11317 then the smallest of them will be the solution, as 11317 is the alphabetically smallest sequence among all presented.
Step three: Let's sort the first set in alphabetical order and then go through permutations one by one in increasing order until we find a prime number:
- 11317, 19, 23, 29, 5 - not a prime, 5 * 22634384659
- 11317, 19, 23, 5, 29 - not a prime, 7 * 16167417647
- 11317, 19, 29, 23, 5 - not a prime, 5 * 22634385847
- 11317, 19, 29, 5, 23 - not a prime, 59 * 1918168297
- 11317, 19, 5, 23, 29 - not a prime, 337 * 335821817
- 11317, 19, 5, 29, 23 - bingo!
The answer is: 113171952923.
P.S. Now, all of this looks horrible, but the only step that requires truly obscene amount of calculations is a primality test for 113171952923. If we can use a computer for that, we're good. We kind of got lucky that the answer is so close to the start of the search, though.
$endgroup$
(Kind of) analytical solution that only requires small amount of calculations, (potentially) doable by hand.
First step: we can safely drop 2, 3 and 7 from the equation as those digits are used in 23 and 17. Now, we need to build a prime from: 5, 11, 13, 17, 19, 23, 29 and 31.
Second step: let's try to build the shortest number possible from these numbers. To do this we need to maximize the number of overlaps.
To do this, let's build a graph of possible overlaps:

An edge from number A to number B means that A and B can overlap (e.g. 11 and 13 can combine into 113). 5 and 29 can't overlap with other numbers. Maximum number of overlaps is equivalent to the (totally) longest possible set of paths in the "main" clique.
After going through all the possible starting points (11, 13, 31 and 23) we find that the maximum number of overlaps is 3 and there're 10 possible sets of paths with this number of overlaps:
- 11 -> 13 -> 31 -> 17 = 11317
- 11 -> 13 -> 31 -> 19 = 11319
- 13 -> 31 -> 11 -> 17 = 13117
- 13 -> 31 -> 11 -> 19 = 13119
- 23 -> 31 -> 11 -> 17 = 23117
- 23 -> 31 -> 11 -> 19 = 23119
- 13 -> 31 -> 17 = 1317, 11 -> 19 = 119
- 13 -> 31 -> 19 = 1319, 11 -> 17 = 117
- 23 -> 31 -> 17 = 2317, 11 -> 19 = 119
- 23 -> 31 -> 19 = 2319, 11 -> 17 = 117
Corollary 1: Any prime number that can be represented as a permutation of one of these 10 sets of numbers (let's call it a candidate):
- 5, 29, 11317, 19, 23
- 5, 29, 11319, 17, 23
- 5, 29, 13117, 19, 23
- 5, 29, 13119, 17, 23
- 5, 29, 23117, 13, 19
- 5, 29, 23119, 13, 17
- 5, 29, 119, 1317, 23
- 5, 29, 117, 1319, 23
- 5, 29, 2317, 119, 13
- 5, 29, 2319, 117, 13
will be the shortest possible prime that contains the first 11 primes. If al least one candidate exist, the smallest of them will be the solution.
Corollary 2: if there are candidates that start with 11317 then the smallest of them will be the solution, as 11317 is the alphabetically smallest sequence among all presented.
Step three: Let's sort the first set in alphabetical order and then go through permutations one by one in increasing order until we find a prime number:
- 11317, 19, 23, 29, 5 - not a prime, 5 * 22634384659
- 11317, 19, 23, 5, 29 - not a prime, 7 * 16167417647
- 11317, 19, 29, 23, 5 - not a prime, 5 * 22634385847
- 11317, 19, 29, 5, 23 - not a prime, 59 * 1918168297
- 11317, 19, 5, 23, 29 - not a prime, 337 * 335821817
- 11317, 19, 5, 29, 23 - bingo!
The answer is: 113171952923.
P.S. Now, all of this looks horrible, but the only step that requires truly obscene amount of calculations is a primality test for 113171952923. If we can use a computer for that, we're good. We kind of got lucky that the answer is so close to the start of the search, though.
edited Sep 25 at 17:41
answered Sep 24 at 13:42
default localedefault locale
3211 silver badge6 bronze badges
3211 silver badge6 bronze badges
4
$begingroup$
Nicely done! :-D
$endgroup$
– Rand al'Thor
Sep 24 at 15:03
$begingroup$
There is a typo: 1919 should read 1319. But that doesn't alter the reasoning.
$endgroup$
– Fred vdP
Sep 25 at 17:15
$begingroup$
@FredvdP Sharp eyes! Fixed that, thank you very much!
$endgroup$
– default locale
Sep 25 at 17:43
$begingroup$
The R functiongmp::isprimesays yes, in about 0.1 seconds of effort. Similar result from MATLAB'sfactor
$endgroup$
– Carl Witthoft
Sep 25 at 18:54
add a comment
|
4
$begingroup$
Nicely done! :-D
$endgroup$
– Rand al'Thor
Sep 24 at 15:03
$begingroup$
There is a typo: 1919 should read 1319. But that doesn't alter the reasoning.
$endgroup$
– Fred vdP
Sep 25 at 17:15
$begingroup$
@FredvdP Sharp eyes! Fixed that, thank you very much!
$endgroup$
– default locale
Sep 25 at 17:43
$begingroup$
The R functiongmp::isprimesays yes, in about 0.1 seconds of effort. Similar result from MATLAB'sfactor
$endgroup$
– Carl Witthoft
Sep 25 at 18:54
4
4
$begingroup$
Nicely done! :-D
$endgroup$
– Rand al'Thor
Sep 24 at 15:03
$begingroup$
Nicely done! :-D
$endgroup$
– Rand al'Thor
Sep 24 at 15:03
$begingroup$
There is a typo: 1919 should read 1319. But that doesn't alter the reasoning.
$endgroup$
– Fred vdP
Sep 25 at 17:15
$begingroup$
There is a typo: 1919 should read 1319. But that doesn't alter the reasoning.
$endgroup$
– Fred vdP
Sep 25 at 17:15
$begingroup$
@FredvdP Sharp eyes! Fixed that, thank you very much!
$endgroup$
– default locale
Sep 25 at 17:43
$begingroup$
@FredvdP Sharp eyes! Fixed that, thank you very much!
$endgroup$
– default locale
Sep 25 at 17:43
$begingroup$
The R function
gmp::isprime says yes, in about 0.1 seconds of effort. Similar result from MATLAB's factor$endgroup$
– Carl Witthoft
Sep 25 at 18:54
$begingroup$
The R function
gmp::isprime says yes, in about 0.1 seconds of effort. Similar result from MATLAB's factor$endgroup$
– Carl Witthoft
Sep 25 at 18:54
add a comment
|
$begingroup$
So I can't yet prove this is the smallest, but it's at least an upper bound:
113,175,192,329
Reasoning:
Obviously, we have to get that 5 away from the last digit or else it's a multiple of 5. But we can't break up the 29, 23, or 19 or we lose those primes. So I tried moving the 5 back a few digits. 113,171,923,529 is divisible by 7. 113,171,952,329 is divisible by 337. But 113,175,192,329 is prime. Might be able to improve on that with some other permutations...
$endgroup$
$begingroup$
Per @Dimitry's answer, your second candidate is indeed prime.
$endgroup$
– MooseBoys
Sep 24 at 3:35
2
$begingroup$
@MooseBoys The second candidate, as I read it, is 113,171,952,329. Dmitry's answer ends in 923.
$endgroup$
– Andrew Morton
Sep 24 at 8:37
add a comment
|
$begingroup$
So I can't yet prove this is the smallest, but it's at least an upper bound:
113,175,192,329
Reasoning:
Obviously, we have to get that 5 away from the last digit or else it's a multiple of 5. But we can't break up the 29, 23, or 19 or we lose those primes. So I tried moving the 5 back a few digits. 113,171,923,529 is divisible by 7. 113,171,952,329 is divisible by 337. But 113,175,192,329 is prime. Might be able to improve on that with some other permutations...
$endgroup$
$begingroup$
Per @Dimitry's answer, your second candidate is indeed prime.
$endgroup$
– MooseBoys
Sep 24 at 3:35
2
$begingroup$
@MooseBoys The second candidate, as I read it, is 113,171,952,329. Dmitry's answer ends in 923.
$endgroup$
– Andrew Morton
Sep 24 at 8:37
add a comment
|
$begingroup$
So I can't yet prove this is the smallest, but it's at least an upper bound:
113,175,192,329
Reasoning:
Obviously, we have to get that 5 away from the last digit or else it's a multiple of 5. But we can't break up the 29, 23, or 19 or we lose those primes. So I tried moving the 5 back a few digits. 113,171,923,529 is divisible by 7. 113,171,952,329 is divisible by 337. But 113,175,192,329 is prime. Might be able to improve on that with some other permutations...
$endgroup$
So I can't yet prove this is the smallest, but it's at least an upper bound:
113,175,192,329
Reasoning:
Obviously, we have to get that 5 away from the last digit or else it's a multiple of 5. But we can't break up the 29, 23, or 19 or we lose those primes. So I tried moving the 5 back a few digits. 113,171,923,529 is divisible by 7. 113,171,952,329 is divisible by 337. But 113,175,192,329 is prime. Might be able to improve on that with some other permutations...
answered Sep 23 at 18:28
Darrel HoffmanDarrel Hoffman
3,82212 silver badges29 bronze badges
3,82212 silver badges29 bronze badges
$begingroup$
Per @Dimitry's answer, your second candidate is indeed prime.
$endgroup$
– MooseBoys
Sep 24 at 3:35
2
$begingroup$
@MooseBoys The second candidate, as I read it, is 113,171,952,329. Dmitry's answer ends in 923.
$endgroup$
– Andrew Morton
Sep 24 at 8:37
add a comment
|
$begingroup$
Per @Dimitry's answer, your second candidate is indeed prime.
$endgroup$
– MooseBoys
Sep 24 at 3:35
2
$begingroup$
@MooseBoys The second candidate, as I read it, is 113,171,952,329. Dmitry's answer ends in 923.
$endgroup$
– Andrew Morton
Sep 24 at 8:37
$begingroup$
Per @Dimitry's answer, your second candidate is indeed prime.
$endgroup$
– MooseBoys
Sep 24 at 3:35
$begingroup$
Per @Dimitry's answer, your second candidate is indeed prime.
$endgroup$
– MooseBoys
Sep 24 at 3:35
2
2
$begingroup$
@MooseBoys The second candidate, as I read it, is 113,171,952,329. Dmitry's answer ends in 923.
$endgroup$
– Andrew Morton
Sep 24 at 8:37
$begingroup$
@MooseBoys The second candidate, as I read it, is 113,171,952,329. Dmitry's answer ends in 923.
$endgroup$
– Andrew Morton
Sep 24 at 8:37
add a comment
|
$begingroup$
Shuffling the sequence of 5 and the non- overlapping 19, 23, and 29 by trial and error produces:
113,172,923,519
$endgroup$
$begingroup$
I figured it could go smaller, just didn't have time to play around with it anymore...
$endgroup$
– Darrel Hoffman
Sep 23 at 19:10
add a comment
|
$begingroup$
Shuffling the sequence of 5 and the non- overlapping 19, 23, and 29 by trial and error produces:
113,172,923,519
$endgroup$
$begingroup$
I figured it could go smaller, just didn't have time to play around with it anymore...
$endgroup$
– Darrel Hoffman
Sep 23 at 19:10
add a comment
|
$begingroup$
Shuffling the sequence of 5 and the non- overlapping 19, 23, and 29 by trial and error produces:
113,172,923,519
$endgroup$
Shuffling the sequence of 5 and the non- overlapping 19, 23, and 29 by trial and error produces:
113,172,923,519
answered Sep 23 at 19:08
collapsarcollapsar
5232 silver badges7 bronze badges
5232 silver badges7 bronze badges
$begingroup$
I figured it could go smaller, just didn't have time to play around with it anymore...
$endgroup$
– Darrel Hoffman
Sep 23 at 19:10
add a comment
|
$begingroup$
I figured it could go smaller, just didn't have time to play around with it anymore...
$endgroup$
– Darrel Hoffman
Sep 23 at 19:10
$begingroup$
I figured it could go smaller, just didn't have time to play around with it anymore...
$endgroup$
– Darrel Hoffman
Sep 23 at 19:10
$begingroup$
I figured it could go smaller, just didn't have time to play around with it anymore...
$endgroup$
– Darrel Hoffman
Sep 23 at 19:10
add a comment
|
Thanks for contributing an answer to Puzzling 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%2fpuzzling.stackexchange.com%2fquestions%2f89448%2fsmallest-prime-containing-the-first-11-primes-as-sub-strings%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$
This seems like it will be very difficult to do without a computer
$endgroup$
– Cruncher
Sep 23 at 18:09
3
$begingroup$
How do you find any prime greater than the spoiler value without using a computer?
$endgroup$
– Weather Vane
Sep 23 at 18:14
$begingroup$
@WeatherVane I compared my guesses to an already calculated List of primes. It was probably done with a computer, but not by me.
$endgroup$
– Darrel Hoffman
Sep 23 at 18:38
6
$begingroup$
We should calculate the first N of these and submit it to the OEIS. I'll start: 2, 23, 253, 2357, 211573, 511327, 1135217... (trial and error on these, might not be all correct)
$endgroup$
– Darrel Hoffman
Sep 23 at 19:20
5
$begingroup$
@DarrelHoffman: 253 is 11 x 23. OEIS already has this sequence btw.
$endgroup$
– Benoit Esnard
Sep 24 at 9:29