trial_division - generator version