Talk:CalmoSoft primes: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Raku incorrect: Problem with Algol stretch result.)
(→‎Raku incorrect: fair point, ten seconds it is)
Line 16: Line 16:


:I agree with your result for primes < 250 and also disagree with some of the other Raku results. Your 2 second target for the stretch goal may be a bit ambitious for the interpreted languages as it takes Wren 2.6 seconds to sieve for primes up to 50 million before even starting to figure out the longest CalmoSoft prime sequence! --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 10:29, 9 April 2023 (UTC)
:I agree with your result for primes < 250 and also disagree with some of the other Raku results. Your 2 second target for the stretch goal may be a bit ambitious for the interpreted languages as it takes Wren 2.6 seconds to sieve for primes up to 50 million before even starting to figure out the longest CalmoSoft prime sequence! --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 10:29, 9 April 2023 (UTC)

:::Fair point, ten seconds it is - fwiw my sieve to 5e7 takes 1.4s, the rest 0.7s. --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 11:57, 9 April 2023 (UTC)


::I also agree your 250 prime result. I also agree that interpreted languages may struggle to do it in 2 seconds. See the notes on the Algol 68 stretch sample. --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 10:53, 9 April 2023 (UTC)
::I also agree your 250 prime result. I also agree that interpreted languages may struggle to do it in 2 seconds. See the notes on the Algol 68 stretch sample. --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 10:53, 9 April 2023 (UTC)

Revision as of 11:57, 9 April 2023

Raku incorrect

I'm getting

For primes up to two hundred and fifty:
The following sequence of 49 consecutive primes yields a prime sum:
 11 + 13 + 17 + 19 + 23 + 29 +..+ 223 + 227 + 229 + 233 + 239 + 241 = 5,813

which disagrees with the Raku output. For ease of reference, the relevant Raku output is

For primes up to two hundred fifty:
Longest sequence of consecutive primes yielding a prime sum: elements: 47
 7 + 11 + 13 + 17 + 19 + 23...199 + 211 + 223 + 227 + 229, sum: 5,107
 11 + 13 + 17 + 19 + 23 + 29...211 + 223 + 227 + 229 + 233, sum: 5,333

Sadly, I don't think there is an OEIS entry I can check this against (tee hee) --Petelomax (talk) 02:48, 9 April 2023 (UTC)

I agree with your result for primes < 250 and also disagree with some of the other Raku results. Your 2 second target for the stretch goal may be a bit ambitious for the interpreted languages as it takes Wren 2.6 seconds to sieve for primes up to 50 million before even starting to figure out the longest CalmoSoft prime sequence! --PureFox (talk) 10:29, 9 April 2023 (UTC)
Fair point, ten seconds it is - fwiw my sieve to 5e7 takes 1.4s, the rest 0.7s. --Petelomax (talk) 11:57, 9 April 2023 (UTC)
I also agree your 250 prime result. I also agree that interpreted languages may struggle to do it in 2 seconds. See the notes on the Algol 68 stretch sample. --Tigerofdarkness (talk) 10:53, 9 April 2023 (UTC)
Re the Algol 68 stretch result, something seems to have gone awry as the sum of the sub-sequence (72619548630200) is clearly not prime. --PureFox (talk) 11:27, 9 April 2023 (UTC)