Giuga numbers: Difference between revisions

m
(→‎{{header|Perl}}: prepend Pascal brute force)
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>
6,962

edits