Puzzle 13: Solution

Q     (In honor of Elwyn Berlekamp and the Mathematical Sciences Research Institute) Solve the cryptarithm
[That is, find distinct digits M,S,R,I,E,L,W,Y,N that make MS/RI=.ELWYNELWYNELWYNELWYN... a true equation.]

A     The unique solution is 23/41 = .56097560975609756097...

Let the fraction MS/RI be a/b in lowest terms, so b is a positive integer less than 100. Since a/b is a repeating decimal of period 5, the denominator b must be a factor of 105-1 but not of 10-1. The prime factorization of 105-1 is 3·3·41·271. Therefore b=41 and RI is either 41 or 82.

Up to cyclic permutation and 9's complements, there are only 4 possible periods of a/41: 02439, 04878, 07317, 14634. Of these, only 02439 has no repeated digits. So, the period of a/41 must be some cyclic permutation of 02439 or its 9's complement 97560. It is then straightforward to check that a=MS=23, with a period of 56097, is the only possibility that makes M,S,R,I,E,L,W,Y,N all different.

This analysis shows that the cryptarithm can be solved by hand, without computer assistance -- at least once the factorization 11111=41·271 is known. To find this factorization, note that all prime factors of 11111 must be congruent to 1 mod 5 (and thus also mod 10); 11 clearly won't do (since 11111 is 1 mod 11), so only 31, 41, 61, and 71 (and their two-digit multiples) are candidates for b, and as it happens the second candidate is the desired factor.