implemented formula, missing is_prime function
finishing touches