De Polignac numbers: Difference between revisions
Content added Content deleted
(→{{header|Ruby}}: Better way to find pow2) |
(→{{header|Ruby}}: attribution added) |
||
Line 1,312: | Line 1,312: | ||
=={{header|Ruby}}== |
=={{header|Ruby}}== |
||
Using Thundergnats observation that it is enough to subtract powers of 2 and verify that none of the results is prime. |
|||
<syntaxhighlight lang="ruby">require 'prime' |
<syntaxhighlight lang="ruby">require 'prime' |
||