Giuga numbers: Difference between revisions
m
→{{header|J}}
(→{{header|Perl}}: prepend Pascal brute force) |
m (→{{header|J}}) |
||
Line 101:
=={{header|J}}==
We can brute force this task building a test for giuga numbers and checking the first hundred thousand integers (which takes a small fraction of a second):
<lang J>giguaP=: {{ (1<y)*(-.1 p:y)**/(=<.) y ((_1+%)%]) q: y }}"0</lang>
|