mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2023-03-15, 17:41   #23
SmartMersenne
 
Sep 2017

5×41 Posts
Default

Can you add a zero to the left at any point (only to be able to add another digit later)?
SmartMersenne is offline   Reply With Quote
Old 2023-03-15, 17:51   #24
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3·7·263 Posts
Default

Quote:
Originally Posted by uau View Post
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.
EdH is offline   Reply With Quote
Old 2023-03-15, 18:16   #25
uau
 
Jan 2017

163 Posts
Default

Quote:
Originally Posted by SmartMersenne View Post
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.
uau is offline   Reply With Quote
Old 2023-03-15, 20:23   #26
SmartMersenne
 
Sep 2017

5×41 Posts
Default

Quote:
Originally Posted by uau View Post
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!
SmartMersenne is offline   Reply With Quote
Old 2023-03-15, 23:54   #27
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3·7·263 Posts
Default

Sorry if my last post seemed rude. Thanks for all the assistance, everyone.
EdH is offline   Reply With Quote
Old 2023-03-16, 05:48   #28
SmartMersenne
 
Sep 2017

5·41 Posts
Default

Quote:
Originally Posted by EdH View Post
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.
SmartMersenne is offline   Reply With Quote
Old 2023-03-16, 12:00   #29
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Liverpool (GMT/BST)

22·3·7·73 Posts
Default

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.
henryzz is offline   Reply With Quote
Old 2023-03-16, 13:52   #30
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3×7×263 Posts
Default

Quote:
Originally Posted by SmartMersenne View Post
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 View Post
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.
EdH is offline   Reply With Quote
Old 2023-03-16, 17:39   #31
Kebbaj
 
Kebbaj's Avatar
 
"Kebbaj Reda"
May 2018
Casablanca, Morocco

2×53 Posts
Default 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
Kebbaj is offline   Reply With Quote
Old 2023-03-26, 10:12   #32
Kebbaj
 
Kebbaj's Avatar
 
"Kebbaj Reda"
May 2018
Casablanca, Morocco

11010102 Posts
Thumbs up

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
Kebbaj is offline   Reply With Quote
Old 2023-04-03, 08:56   #33
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Liverpool (GMT/BST)

22×3×7×73 Posts
Default

Was a there a better solution for this challenge than recursion exiting after too many exceptions?
henryzz is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ponder This - April 2023 tgan Puzzles 7 2023-04-20 04:07
Collected Ibm ponder this solutions R. Gerbicz Puzzles 6 2020-03-30 05:58
March 2016 Xyzzy Puzzles 21 2016-06-09 20:26
gmp 4.2 due in March 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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔