sub egypt { my $f = 2; do {return (--$f, egypt($_[0] / $f)) unless $_[0] % $f++} while $_[0] > 1; }