Primes: n*2^m+1: Difference between revisions
m
→{{header|Raku}}: typo
Thundergnat (talk | contribs) (New draft task and Raku example) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: typo) |
||
Line 17:
=={{header|Raku}}==
First
<syntaxhighlight lang="raku" line>-> $n { (^∞).map: -> $m { if (my $p = $n × 2 ** $m + 1).is-prime { say "$n: $p"; last } } } for 1..400</syntaxhighlight>
{{out}}
|