Home
Random
Log in
Settings
About Rosetta Code
Disclaimers
Rosetta Code
Search
Repunit primes: Difference between revisions
Page
Discussion
← Older edit
Newer edit →
Repunit primes
(view source)
Revision as of 21:42, 11 October 2023
7 bytes added
,
7 months ago
→J
:
only a few seconds faster
Revision as of 19:49, 11 October 2023
(
view source
)
Querfeld
(
talk
|
contribs
)
(
→J
:
add
)
← Older edit
Revision as of 21:42, 11 October 2023
(
view source
)
Querfeld
(
talk
|
contribs
)
(
→J
:
only a few seconds faster
)
Newer edit →
Line 307:
=={{header|J}}==
Slow (runs
for
several minutes)
.
:
<syntaxhighlight lang="j">repunitp=. 1 p:
<:@
^ %
&
<:
@
[
(2x + i. 15) (;/@[ ,. repunitp"0/ <@# ])
2 +
i.
&.(p:inv)
999
1000
</syntaxhighlight>
{{out}}
<pre>
Querfeld
559
edits