Sum of primes in odd positions is prime: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) (Added Perl) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: minor tweak to satisfy task spec) |
||
Line 236:
my @sums = [\+] @odd;
say .fmt('%5d') for grep { .[1].is-prime }, ( (1,3…*) Z @odd Z @sums );</lang>
{{out}}
<pre> 1 2 2
27 103 659▼
35 149 1181▼
▲103 659
67 331 5021▼
▲149 1181
91 467 9923▼
▲331 5021
95 499 10909▼
▲467 9923
99 523 11941▼
▲499 10909
119 653 17959▼
▲523 11941
143 823 26879</pre>▼
▲653 17959
▲823 26879</pre>
=={{header|REXX}}==
|