Quad-power prime seeds: Difference between revisions

added Arturo
(Added Perl)
(added Arturo)
Line 116:
First element over 10000000: 10023600, index: 701
</pre>
 
=={{header|Arturo}}==
 
<syntaxhighlight lang="arturo">quadPowerPrime?: function [n]->
every? [[n+n+1] [1+n+n^2] [1+n+n^3] [1+n+n^4]] 'x ->
prime? do x
 
first50qpps: select.first:50 1..∞ => quadPowerPrime?
 
loop split.every: 10 first50qpps 'x ->
print map x 's -> pad to :string s 7</syntaxhighlight>
 
{{out}}
 
<pre> 1 2 5 6 69 131 426 1665 2129 2696
5250 7929 9689 13545 14154 14286 16434 19760 25739 27809
29631 36821 41819 46619 48321 59030 60500 61955 62321 73610
77685 79646 80535 82655 85251 86996 91014 96566 97739 105939
108240 108681 119754 122436 123164 126489 140636 150480 153179 163070</pre>
 
=={{header|F_Sharp|F#}}==
Line 140 ⟶ 159:
First element over 10000000 is 10023600 at index 700
</pre>
 
=={{header|Factor}}==
{{works with|Factor|0.99 2022-04-03}}
1,532

edits