RosettaCodeData/Task/Additive-primes/Raku/additive-primes.raku
2023-07-01 13:44:08 -04:00

3 lines
189 B
Raku

unit sub MAIN ($limit = 500);
say "{+$_} additive primes < $limit:\n{$_».fmt("%" ~ $limit.chars ~ "d").batch(10).join("\n")}",
with ^$limit .grep: { .is-prime and .comb.sum.is-prime }