20230301, 15:09  #1 
Aug 2002
8,689 Posts 
Ponder This  March 2023

20230301, 19:21  #2 
Jan 2023
3^{2}·7 Posts 
My best candidate so far using a moderately unoptimized stochastic solver is 25 digits. It's an interesting problem that seems to resist being broken down into subproblems, as it's not guaranteed that taking the "exception" later rather than earlier will always be optimal.

20230309, 19:47  #3 
Jun 2016
40_{8} Posts 
Like the previous poster, I can't really see a smart way to do this problem. My singlethreaded code for the base problem took nearly 2 hours, and the bonus problem is substantially harder. I've now multithreaded my code, but it looks like it's going to take about 2 days to find an answer. I'm using python and primefac, not sure if other languages might be faster but I assume primefac is using C or something behind the scenes, and the isprime function seems to be similar in speed to Pari/GP. Without giving any spoilers as to the details, has anyone come up with a smarter approach?

20230309, 22:56  #4 
"Ed Hall"
Dec 2009
Adirondack Mtns
13204_{8} Posts 
My approach was less smart, brute force, with C++, but it took a couple hours (maybe  I didn't time it) for the base problem and I haven't seen a solution to the bonus part after many days. I didn't time anything, but I also ran a version that included all the 05 for the basic and it completed 04 toward the bonus. They also haven't posted or responded to my email, so I don't even know if I'm on the right track. I have been in error in the past, but at least then they told me, so I could try something else.
I'm going to entirely rework what I did, in C this time, and see if it does better and also use it to check my previous solutions. 
20230310, 13:09  #5 
Jan 2017
174_{10} Posts 
My Python code (using is_prime from gmpy2) was faster, but not by so much that it'd likely indicate a fundamentally different search.
Last fiddled with by uau on 20230310 at 13:10 Reason: broken quote tag 
20230310, 14:28  #6 
Jun 2016
2^{5} Posts 
Just did a quick test and seems like gmpy2 is about 6 times faster than the library I was using, so I'll switch to that, thanks!

20230310, 23:13  #7 
Jun 2003
11001011111_{2} Posts 

20230311, 04:17  #8 
Sep 2017
207_{10} Posts 
How large (in terms of number of digits) are the best solutions people found so far (for both problems)?

20230311, 05:59  #9 
Jul 2015
101011_{2} Posts 
HOW can we know
How can we know that a solution is the optimal

20230311, 09:48  #10 
Sep 2017
3^{2}·23 Posts 

20230311, 17:43  #11 
Jan 2017
2·3·29 Posts 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Ponder This  April 2023  tgan  Puzzles  7  20230420 04:07 
Collected Ibm ponder this solutions  R. Gerbicz  Puzzles  6  20200330 05:58 
March 2016  Xyzzy  Puzzles  21  20160609 20:26 
gmp 4.2 due in March  Mystwalker  GMPECM  4  20060201 12:00 