Could anybody tell me how mathamatically you would determinte if a number is prime (what is the formula)?

Thanks in advance.