Least m such that n! + m is prime: Difference between revisions

Added Quackery.
(→‎{{header|Ruby}}: copy paste error)
(Added Quackery.)
Line 288:
</pre>
Note this is very slow, and ''still'' running..... so I killed it there
 
=={{header|Quackery}}==
 
<code>from</code>, <code>index</code>, and <code>end</code> are defined at [[Loops/Increment loop index within loop body#Quackery]].
 
<code>prime</code> is defined at [[Miller–Rabin primality test#Quackery]].
 
<syntaxhighlight lang="Quackery"> [ 1 swap times [ i^ 1+ * ] ] is ! ( n --> n )
 
[] 50 times
[ i^ !
1+ from
[ index prime if
[ index i^ ! -
join end ] ] ]
[] swap
witheach
[ number$ nested join ]
49 wrap$
</syntaxhighlight>
 
{{out}}
 
<pre>1 1 1 1 5 7 7 11 23 17 11 1 29 67 19 43 23 31 37
89 29 31 31 97 131 41 59 1 67 223 107 127 79 37
97 61 131 1 43 97 53 1 97 71 47 239 101 233 53 83</pre>
 
=={{header|Raku}}==
1,484

edits