Update useful_functions.py

Code updated to reflect the fact that once you reach half the number and do not find a divisor,  it is always prime as the lowest possible factor is 2*n. Should make it faster for large numbers.