> from math import sqrt > > def isprime(n, factor): > if n == 1: > return False > for x in range(2, round(sqrt(n))): Ooops, this should obviously read for x in range(factor, round(sqrt(n))): best regards, Robert S.