I'm testing each integer to see how many factors it has, and this works fine:
@Factors = factors($fN);
# every number has ONE and ITSELF as factors in addition to the ones found by factor()
$NumFac = scalar(@Factors) + 2;
But after a while it blows up, on numbers in excess of about 45 million, with an out of memory error.
Any idea what's up?
It's certainly much faster than my code to do ($fN % $loop) as loop runs from 1 to half of the number under test!
Thanks!