Help for this page

Select Code to Download


  1. or download this
        my $N = shift;
        my $sqrt = sqrt( $N );
    ...
        return 1 if @factor == 1;
            # ... rest of the code
            return $f < $sqrt ? $f : undef;
    
  2. or download this
        my $N = shift;
        my $sqrt = sqrt( $N );
    ...
        return 1 if @factor == 1;
            # ... rest of the code
            return $f < $sqrt ? $f : undef;
    
  3. or download this
        my $N = shift;    
        my @factor = prime_factors( $N );
    ...
        return 1 if @factor == 1;
            # ... rest of the code
            return $f;