Prime words: Difference between revisions
m
→{{header|Raku}}: add another variation
Thundergnat (talk | contribs) m (→{{header|Raku}}: update output for updated code) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: add another variation) |
||
Line 262:
@words.grep({ .comb».ord.sum.is-prime }).&{display +$_, .head(20)};
say "\n\
say "\nNumber of words whose 'digits' are all prime in base 36: ",
@words.hyper.grep({ !.contains(/\W/) && all(.comb».parse-base(36)).is-prime }).&{display +$_, $_, ''};
say "\nNumber of words that are prime in base 36: ",
Line 291 ⟶ 294:
Number of words whose 'digits' are all prime in base 36: 18;
2nd, 5th, 7th, b, d, h, j, n, nd, nh, nj, nv, t, tn, tnt, tv, v, vt
Number of words that are prime in base 36: 1106;
|