3, 5, 11, 17, 31, ?


The sequence you’ve provided appears to be a list of prime-indexed primes12. In this sequence, each term is a prime number whose position in the list of all prime numbers is also a prime number.

To find the next term, we need to identify the next prime number whose position in the sequence of all primes is also a prime number. The next prime number after 31 is 37, but 37 is the 12th prime number, and 12 is not a prime. The next prime number after 37 is 41, and 41 is the 13th prime number, and 13 is a prime number.

So, the next term in the sequence is 41.