Created prime number function
First attempt. Works for normal sized numbers but performance is horrible with a large number