De Polignac numbers: Difference between revisions

→‎{{header|Perl}}: removed the bigint pragma, as the code was painfully slow
(Added Sidef)
(→‎{{header|Perl}}: removed the bigint pragma, as the code was painfully slow)
Line 1,302:
{{libheader|ntheory}}
<syntaxhighlight lang="perl" line>use v5.36;
use bigint;
use ntheory <is_prime vecmax vecany logint>;
 
Line 1,311 ⟶ 1,310:
while ($n++) {
next unless $n % 2;
next if vecany { is_prime($n - 2**(1 << $_)) } reverse(1 .. logint ($n, 2));
push @D, comma $n;
last if 10_000 == @D;
2,747

edits