#!/usr/bin/env perl use warnings; use strict; use ntheory qw/factor/; srand(1); for (1..100000) { my $n = int(rand(2**36)); my @d = divisors($n,factor($n)); print "$n @d\n"; }