Jump to content

Repunit primes: Difference between revisions

m
→‎J: minor optimization
(→‎J: only a few seconds faster)
m (→‎J: minor optimization)
Line 307:
 
=={{header|J}}==
Slow (runs fora severalfew minutes):
<syntaxhighlight lang="j">repunitp=. 1 p: ^&x: %&<: [
 
(2x2 + i. 15) (;/@[ ,.;"0 repunitp"0/ <@# ]) i.&.(p:inv) 1000</syntaxhighlight>
{{out}}
<pre>
559

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.