Smarandache-Wellin primes: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (→{{header|Raku}}: Add a Raku example) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: Whoops, overlooked zero) |
||
Line 39: | Line 39: | ||
sink @Smarandache-Whellen[1500]; # pre-reify for concurrency |
sink @Smarandache-Whellen[1500]; # pre-reify for concurrency |
||
sub derived ($n) { my %digits = $n.comb.Bag; ( |
sub derived ($n) { my %digits = $n.comb.Bag; (0..9).map({ %digits{$_} // 0 }).join } |
||
sub abbr ($_) { .chars < 41 ?? $_ !! .substr(0,20) ~ '…' ~ .substr(*-20) ~ " ({.chars} digits)" } |
sub abbr ($_) { .chars < 41 ?? $_ !! .substr(0,20) ~ '…' ~ .substr(*-20) ~ " ({.chars} digits)" } |
||
Line 67: | Line 67: | ||
Smarandache-Whellen derived primes: |
Smarandache-Whellen derived primes: |
||
Index: |
Index: 31, 4194123321127 |
||
Index: |
Index: 71, 547233879626521 |
||
Index: |
Index: 72, 547233979727521 |
||
Index: |
Index: 133, 13672766322929571043 |
||
Index: |
Index: 224, 3916856106393739943689 |
||
Index: |
Index: 302, 462696313560586013558131 |
||
Index: |
Index: 308, 532727113760586013758133 |
||
Index: |
Index: 362, 6430314317473636515467149 |
||
Index: |
Index: 461, 8734722823685889120488197 |
||
Index: |
Index: 489, 9035923128899919621189209</pre> |
||
</pre> |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |