Multithreaded prime number finder