Talk:Strange unique prime triplets: Difference between revisions

 
(4 intermediate revisions by 4 users not shown)
Line 11:
 
:: The renaming sounds good to me.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 13:29, 10 March 2021 (UTC)
 
* Do (3,5,11) and (11,3,5) count as distinct? IMO they shouldn't, but that should be clarified in the task. [[User:Thebigh|Thebigh]] ([[User talk:Thebigh|talk]]) 10:19, 29 March 2021 (UTC)
 
: I just assumed n<m<p was implied, can't see any problem with being specific about that. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 11:09, 29 March 2021 (UTC)
::I just added that stipulation for clarity. [[User:Thebigh|Thebigh]] ([[User talk:Thebigh|talk]]) 11:29, 29 March 2021 (UTC)
 
== other definitions of '''strange''' primes ==
Line 18 ⟶ 23:
One possibility is to rename this Rosetta Code task to: &nbsp; &nbsp; '''three primes summing to a prime''' &nbsp; &nbsp; or
<br>'''three unique primes summing to a prime''', &nbsp; &nbsp; or somesuch.
 
 
 
'''Mathoverflow''' &nbsp; has different definition at:
Line 46 ⟶ 49:
::::::Certainly 28 billion in 48 minutes (you know who you are) has gone too far, without some better or interesting or clever approach. <br>
::::::[I take any timings with a big pinch of salt, mostly don't really care that much about 4 or 8x, but certainly want to see any 20 or 100x.]<br>
 
::::::However, I would strongly defend the right of any draft task to be a "moving target" for at least 5 days, besides, no-one is forced to post an entry until things settle down. Otherwise, point taken, I largely agree, elegance beats speed anyday. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 15:12, 11 March 2021 (UTC)
 
:::::::Thanks for the hint about using an intermediate sum being faster. It doesn't make much difference to Go (down to 1.25 seconds) but it knocks 9 seconds off Wren (down to 21 seconds) so i'm very pleased with that :) --[[User:PureFox|PureFox]] ([[User talk:PureFox|talk]]) 16:29, 11 March 2021 (UTC)
 
:::::::: The REXX entry made use of an intermediate sum from the get-go. &nbsp; It essentially cuts the number of additions by half. &nbsp; &nbsp; The next big speed improvement was just using odd numbers for the search. &nbsp; I had experimented with the idea of just using primes, &nbsp; as the REXX code that generates primes builds them in a sequential list. &nbsp; But it made the code a lot harder to understand, even though it was a bit faster. &nbsp; As it is, using an associative array instead of an &nbsp; '''isPrime''' &nbsp; function is very fast &nbsp; (a simple &nbsp; '''if''' &nbsp; instead of invoking a function). &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 16:43, 11 March 2021 (UTC)
781

edits