I am not looking for an efficient way to find primes (which of course is a solved problem). This is more of a what if question. So, in theory: Could you train a neural network to predict whether or not a given number n is composite or prime? How would such a network be laid out?
Could a neural network detect primes?
neural networks