Talk:Sexy primes: Difference between revisions

m
→‎possible errors in most programs: added underlining to call attention that a pair is being discussed.
m (→‎possible errors in most programs: added underlining to call attention that a pair is being discussed.)
Line 4:
However, if he had chosen   '''100''',   most computer programs would give an erroneous number of   unsafe   primes,   as   '''97'''   is a sexy prime.   Most computer programs only check up to   '''N'''.   As of this writing, only REXX checks for sexy primes up to   '''N + 6''',   and carefully programs not to list sexy primes over the upper limit   (but still finds but not displays the upper half of sexy prime pairs if it exceeds the upper limit).
 
Also, it isn't clear that in the above case of &nbsp; '''100''' &nbsp; being the upper limit, &nbsp; should &nbsp; '''97''' &nbsp; be listed as the 1<sup>st</sup> half of a sexy prime <u>pair</u> if the top part of the pair is above the upper limit?
 
Now, it so happens that the next six numbers after &nbsp; 1,000,000 &nbsp; are all composite, &nbsp; so all the program results are correct, even if they lucked out. &nbsp; However, for the general case, &nbsp; '''100''' &nbsp; would be a good additional test case to count the number of sexy primes &nbsp; (or unsexy primes). &nbsp; Computer programs should behave correctly with a different upper limit.