Giuga numbers: Difference between revisions

no edit summary
No edit summary
Line 24:
* [[oeis:A007850|OEIS:A007850 - Giuga numbers]]
<br><br>
 
=={{header|Perl}}==
<lang perl>#!/usr/bin/perl
 
use strict; # https://rosettacode.org/wiki/Giuga_numbers
use warnings;
use ntheory qw( factor forcomposites );
use List::Util qw( all );
 
forcomposites
{
my $n = $_;
all { ($n / $_ - 1) % $_ == 0 } factor $n and print "$n\n";
} 4, 67000;</lang>
{{out}}
<pre>
30
858
1722
66198
</pre>
 
=={{header|Wren}}==
Anonymous user