Rework prime numbers functions.
Add problem 58.