Problem: A B C B A = D * B E * B F F A The factors shall be prime numbers. Solution: We solve the more general equation ABXBA = D * BE * BYZA where the factors BE and BYZA are relative prime to 10. Further there is no restriction for the digits X, Y, and Z. As BE and BYZA are not even or a multiple of 5 the digits A, E are members of P10 = {1, 3, 7, 9}. Now ABXBA is relative prime to 10 too as its last digit is A. Therefore the right hand side must be relative prime to 10 too that is each factor must be relative prime to 10. That is D is member of P10. Modulo 5 the set P10 is P5 = {1, 3, 2, 4}. Looking at the equation modulo the prime 5 we get the congruence A = D * E * A (mod 5) As A != 0 (mod 5) we can cancal A from the congruence and get 1 = D * E (mod 5) This has the solutions D=E=1, D=E=4, and {D,E} = {2,3}. Looking for solutions in P10 we get D=E=1, D=E=9, and {D, E} = {3, 7}. Only the last one has D != E. That is {D, E} = {3, 7}. Now look at the leading digits. We have D * B * B <= A <= 9. As 1 <= B*B <= 9/D <= 3 we conclude that B = 1. Now {B, D, E} = {1, 3, 7} so the only possible value left for A is A = 9. Now we are almost done. Case (A, B, D, E) = (9, 1, 3, 7): As 17 is a factor of ABXBA we have 91019 + 100X = 1 - 2X = 0 (mod 17) <=> 2X = 1 (mod 17) => X = 9 (mod 17) => X = 9. But 3 is no divisor of 91919. no solution. Case (A, B, D, E) = (9, 1, 7, 3): As 13 is a factor of ABXBA we have 91019 + 100X = 6 - 4X = 0 (mod 13) <=> 4X = 6 (mod 13) => X = 8 (mod 13) => X = 8. And indeed 7 * 13 * 1009 = 91819 is a solution. As all factors are primes it solves the original problem 91819 = 7 * 13 * 1009 Reference: Ken Russell, MENSA Magazine Oct. 1996, p28