Extra primes: Difference between revisions
→{{header|Perl}}: updated code to also check the sum of digits
(→{{header|Perl}}: updated code to also check the sum of digits) |
|||
Line 1,676:
use warnings;
use feature 'say';
use ntheory
my $
forprimes {
is_prime(vecsum(todigits($_))) and /^[2357]+$/ and $
say $n =~ s/.{1,80}\K /\n/gr;</lang>▼
} 1e4;
{{out}}
<pre>
</pre>
=={{header|Phix}}==
|