Creating and testing prime number generator
Very inefficient (but correct) implementation of prime factorisation