Ramanujan primes/twins: Difference between revisions
m
→{{header|Raku}}: Avoid calculating excess Ramanujan primes before filering
Thundergnat (talk | contribs) (→{{header|Raku}}: Add a Raku example) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: Avoid calculating excess Ramanujan primes before filering) |
||
Line 338:
=={{header|Raku}}==
Timing is informational only. Will vary by system specs and load.
<lang perl6>use ntheory:from<Perl5> <ramanujan_primes nth_ramanujan_prime>;
use Lingua::EN::Numbers;
my @rp = ramanujan_primes
for (1e5, 1e6)».Int -> $limit {
Line 355:
The 1,000,000th Ramanujan prime is 34,072,993
There are 74,973 twins in the first 1,000,000 Ramanujan primes.
2.
=={{header|Wren}}==
|