Giuga numbers: Difference between revisions

Added Quackery.
No edit summary
(Added Quackery.)
Line 1,110:
n += 1</syntaxhighlight>
 
=={{header|Quackery}}==
 
<code>dpfs</code> is Distinct Prime Factors.
 
<syntaxhighlight lang="Quackery"> [ [] swap
dup times
[ dup i^ 2 + /mod
0 = if
[ nip dip
[ i^ 2 + join ]
[ dup i^ 2 + /mod
0 = iff
nip again ] ]
drop
dup 1 = if conclude ]
drop ] is dpfs ( n --> [ )
 
[ dup dpfs
dup size 2 < iff
[ 2drop false ]
done
true unrot
witheach
[ 2dup / 1 -
swap mod 0 != if
[ dip not
conclude ] ]
drop ] is giuga ( n --> b )
 
[] 0
[ 1+ dup giuga if
[ tuck join swap ]
over size 4 = until ]
drop
echo</syntaxhighlight>
 
{{out}}
 
<pre>[ 30 858 1722 66198 ]</pre>
 
=={{header|Raku}}==
1,462

edits