Research the different algorithms used to find prime numbers. Compare and contrast them and explain how the algorithms work.