Question 918753
Seems like an awkwardly-written problem, but what I'm getting from it is, if N = AB, then when N is written in base 8, those two digits form a prime number (when evaluated in base 10). For example, 59_10 = 73_8, and 73 (in base 10) is also prime. However 59 in base 12 is 5A.


Since prime checking is not the most efficient algorithm, there's not really an efficient way to do it, that I know of. One thing to note is, N_10 is prime, and it follows that the base-8 and base-12 representations of N cannot have digits summing to a multiple of 3. I wrote a small program to find the 2-digit numbers (in base 10) that work:


19 (23 in base 8, 17 in base 12)
43 (53 in base 8, 37 in base 12)