mersenneforum.org Ponder This - March 2023
 Register FAQ Search Today's Posts Mark Forums Read

 2023-03-15, 17:41 #23 SmartMersenne   Sep 2017 5×41 Posts Can you add a zero to the left at any point (only to be able to add another digit later)?
2023-03-15, 17:51   #24
EdH

"Ed Hall"
Dec 2009

3·7·263 Posts

Quote:
 Originally Posted by uau First, the description defines "n-exception chained primes" as numbers appearing in a chain with at most n exceptions (so any number in a such a chain satisfies the definition). Then it explicitly confirms that with "Note that p can also be non-prime, if it is considered one of the exceptions.". Earlier there was also a remark in parentheses something like "so it'd be called a non-prime n-exception chained prime?", making that part even harder to miss, but that extra remark has apparently just been removed.
OK, I give up.

2023-03-15, 18:16   #25
uau

Jan 2017

163 Posts

Quote:
 Originally Posted by SmartMersenne Can you add a zero to the left at any point (only to be able to add another digit later)?
No. While that is perhaps not quite 100% clear from the description, allowing it would render the question meaningless. If you start with a prime, then adding zeros to the left would keep it a prime, and if you test enough zero prefix lengths, eventually you're expected to find one such that you can add another digit to the start while keeping it a prime (1000000000000000000000000000000000000003 and so on). This would allow you to get arbitrarily high numbers even with zero exceptions.

2023-03-15, 20:23   #26
SmartMersenne

Sep 2017

5×41 Posts

Quote:
 Originally Posted by uau No. While that is perhaps not quite 100% clear from the description, allowing it would render the question meaningless. If you start with a prime, then adding zeros to the left would keep it a prime, and if you test enough zero prefix lengths, eventually you're expected to find one such that you can add another digit to the start while keeping it a prime (1000000000000000000000000000000000000003 and so on). This would allow you to get arbitrarily high numbers even with zero exceptions.
Good point!

 2023-03-15, 23:54 #27 EdH     "Ed Hall" Dec 2009 Adirondack Mtns 3·7·263 Posts Sorry if my last post seemed rude. Thanks for all the assistance, everyone.
2023-03-16, 05:48   #28
SmartMersenne

Sep 2017

5·41 Posts

Quote:
 Originally Posted by EdH Sorry if my last post seemed rude. Thanks for all the assistance, everyone.
I don't think it was rude, but you gave up easily. It is really not that hard to understand: the last number of the sequence may or may not be a prime itself, that's it.

 2023-03-16, 12:00 #29 henryzz Just call me Henry     "David" Sep 2007 Liverpool (GMT/BST) 22·3·7·73 Posts Although my code doesn't assume that the last one is prime my final solution was prime. Is anyone who has solved willing to check my solution by PM? They are quite slow at confirming results are correct. I think I have a bug in my code that undercounts the number of exceptions by 1. If undercounting(or more likely applying the cutoff) is the only issue then I have the largest solution for 6 exceptions as well as 5.
2023-03-16, 13:52   #30
EdH

"Ed Hall"
Dec 2009

3×7×263 Posts

Quote:
 Originally Posted by SmartMersenne I don't think it was rude, but you gave up easily. It is really not that hard to understand: the last number of the sequence may or may not be a prime itself, that's it.
The problem is that I haven't done any of these puzzles for a long time because I couldn't understand what was asked for. I "thought" I could do this one, but if I still don't understand this simple a puzzle, then I should give it up.

Quote:
 Originally Posted by henryzz Although my code doesn't assume that the last one is prime my final solution was prime. Is anyone who has solved willing to check my solution by PM? They are quite slow at confirming results are correct. I think I have a bug in my code that undercounts the number of exceptions by 1. If undercounting(or more likely applying the cutoff) is the only issue then I have the largest solution for 6 exceptions as well as 5.
I don't think my code assumes prime for the last one, either, but not because I took that into consideration in my programming. I also wrote a small bash script which uses gp to check the number of exceptions for the result.

 2023-03-16, 17:39 #31 Kebbaj     "Kebbaj Reda" May 2018 Casablanca, Morocco 2×53 Posts very nice question I haven't participated in a long time. when I saw this very nice question I could not resist. I try a code quickly, and i found a number at 23. Last fiddled with by Kebbaj on 2023-03-16 at 17:44
 2023-03-26, 10:12 #32 Kebbaj     "Kebbaj Reda" May 2018 Casablanca, Morocco 11010102 Posts Finally, I was able to have it this morning. It was not easy! The football match: Morocco - Brazil (2-1), gave me motivation yesterday. This morning my little laptop 8-year-old with and 8go RAM was able to give me the results of all possible cases. The last chance with the last code inspired. Ran at midnight. Best result is 28 Digits. A lot of test with a result always of 26 digits, I was even going to give up. Now I even have a 27 Digit solution. to soccer!!! And the Moroccoan team football who inspired me. Thanks to the web master for this beautiful Challenge Last fiddled with by Kebbaj on 2023-03-26 at 10:13
 2023-04-03, 08:56 #33 henryzz Just call me Henry     "David" Sep 2007 Liverpool (GMT/BST) 22×3×7×73 Posts Was a there a better solution for this challenge than recursion exiting after too many exceptions?

 Similar Threads Thread Thread Starter Forum Replies Last Post tgan Puzzles 7 2023-04-20 04:07 R. Gerbicz Puzzles 6 2020-03-30 05:58 Xyzzy Puzzles 21 2016-06-09 20:26 Mystwalker GMP-ECM 4 2006-02-01 12:00

All times are UTC. The time now is 14:46.

Thu Jun 8 14:46:51 UTC 2023 up 294 days, 12:15, 0 users, load averages: 1.10, 0.99, 1.10