Talk:Sexy primes: Difference between revisions

m
 
(14 intermediate revisions by 6 users not shown)
Line 1:
==[[Successive prime differences]]==
Sexy primes isn't significantly different from successive primes. Rosetta code is about algorithmic expression rather than tricking programmers into not searching through highest prime plus six. Please remove the task. --LambertDW 15:16, 20 May 2019 (UTC)
:I think the problem is with the Successive Primes task. Which primes separated by 2 are not successive? (none). Which primes separated by 4 are not successive? (only 3 and 7 with 5 playing gooseberry). Interest begins at 6 when 7 and 13 are a sexy pair but are not successive (11 playing gooseberry). So we have a sequence of sexy primes starting at 7, and a sequence of successive primes separated by 6 starting at 31 which is a subset of the sexy primes. Beyond being a subset what other relationships exist? What happens beyond 6? As it stands the Successive Primes task offers no insight into Successive Primes. I have added 2 references to that task. The first looks at the number theoretic issues, the second at some interesting questions that can be asked about Successive Primes. Another contributor has added a third reference which takes one of the questions asked in 2 (what is the longest sequence of Successive Primes with increasing separation?) to the max.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 10:26, 21 May 2019 (UTC)
 
:I think both tasks should remain. Maybe this task could be better worded - it's still in draft, and now is the time to suggest/make improvements?<br> --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 10:40, 21 May 2019 (UTC)
 
== last 5 ==
For slightly neater output, I (Phix) implemented "last 5" as "at most last 5", then cheekily changed the task description accordingly.
Should anyone object, speak up. [[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 00:07, 13 November 2018 (UTC)
 
== possible errors in most programs ==
The task's author used &nbsp; '''1,000,000''' &nbsp; as a test case upper limit.
Line 39 ⟶ 49:
 
::::: '''"So I rather resent the fact that I found (as it turned out) an incorrect output, and you thought that I meant another incorrect output"''' Make me play guessing games and then get all bent when I guess? Ok. Resent away. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 11:46, 2 October 2018 (UTC)
 
:Why not simply define:<br>SP pairs as n such that n<1000035 and n is prime and n-6 is prime<br>SP triplets as n is a member of the set of SP pairs and n-12 is prime<br>SP quadruplets as n is a member of the set of SP triplets and n-18 is prime<br>SP quintuplets as n is a member of the set of SP quadruplets and n-24 is prime<br>Unsexy primes as n<1000035 and n-6 is not prime and n+6 is not prime<br>--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:54, 2 October 2018 (UTC)
:::::: No, it's not that you guessed wrong (and created a strawman argument), &nbsp; but that you characterized my opinions either as ridiculous and/or that I couldn't tell if my (output) count was different than another's. &nbsp; (I obviously did know the difference). &nbsp; It was your pejorative statements and name calling that caused me "to get all bent" as you characterized it. &nbsp; I'd like this jabbing to stop, as it doesn't reflect well on Rosetta Code to shoot the messenger. &nbsp; This matters to me and it's not just crap (your word). &nbsp; We should be able to discuss topics freely without this kind of thing. &nbsp; I had opened this discussion page with the intent to make aware that most computer programs ''seemed'' incorrect at that time (as they didn't take into account ''straddled'' sexy primes as far as I could discern). &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 16:12, 6 October 2018 (UTC)
 
:::::::'''"I had opened this discussion page with the intent to make aware that most computer programs seemed incorrect at that time (as they didn't take into account straddled sexy primes as far as I could discern)'''" And I agreed and promptly changed the task to make that shortcoming obvious. Why is there still a problem?
 
:::::::'''"This matters to me and it's not just crap (your word)."''' It seems to me that the "this" you are referring is not Rosetta Code, but your wounded pride and outrage that someone had the temerity to disagree with you, and by all that is holy, you're not going to let that go... um, what's the word I'm looking for... oh yes! unharangued. In that case, yep, it's crap. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 17:41, 6 October 2018 (UTC)
 
:Why not simply define:<br>SP pairs as n such that n<1000035 and n is prime and n-6 is prime<br>SP triplets as n is a member of the set of SP pairs and n-12 is prime<br>SP quadruplets as n is a member of the set of SP triplets and n-18 is prime<br>SP quintuplets as n is a member of the set of SP quadruplets and n-24 is prime<br>Unsexy primes as n<1000035 and n is prime and n-6 is not prime and n+6 is not prime<br>--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:54, 2 October 2018 (UTC)
 
:I too don't like the idea of needing to look beyond the given "limit" to check sexiness. When is a limit not a limit? When you are forced to look beyond it. [[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 12:47, 3 October 2018 (UTC)
::Do you mean not needing, otherwise I can make no sense of the above, either way perhaps you could clarify what you'd like to change. In the Python program you define primeset. You then write 'for p in primes' which recalculates the primes, why don't you instead say for p in primeset? You define 'primearray = [n in primeset for n in range(LIMIT)]' where is primearray actually used?--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:20, 4 October 2018 (UTC)
 
:: (in reply to Paddy3118) Let me explain my reasoning with an analogous (though slightly bogus) example: Suppose we had some hypothetical task: "'''List the positive integers less than 50 whose square contains a digit '1''''". Would you argue that only 1 and 4 should be listed? After all, the limit is 50, and 9, 10, 11, etc. have (all numbers larger than 7 have) a square greater than the limit. The task is asking for numbers within a limit that have a certain property. The fact that having that property may depend on numbers outside of that limit doesn't change that it has that property. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 12:54, 4 October 2018 (UTC)
Anonymous user