Introduction Finding prime numbers is a common task in mathematics and computer science. Prime numbers have fascinated mathematicians for centuries,…