A permutable prime is a prime number which can have its digits' positions switched through any permutation and still be a prime number.
For eg, \(2\) is permutable prime as it contains only one digit. \(13\) is a permutable prime as both \(13\) and \(31\) are prime. Note that each permutation of a permutable prime is considered as a unique solution. So \(13\) and \(31\) are considered as two different solutions.
How many permutable primes exist below \(10000000\) in base \(10\)?
P.S. Both Number Theory and Computer Science solution exists for this problem.