[net.math] arithmetic solution of string puzzle

lew (05/28/82)

A little arithmetic can help, even in a string problem. We can cast
problem in the equation:

  2 * ( 10*x + n ) == 10**p * n + x  , which becomes

  19 * x == ( 10**p - 2 ) * n

Of course, we have the restrictions that 1 <= n <= 9, and that x is a
p-digit number. It follows then that 19 must be a factor of 10**p - 2.
This least value of p for which this is true is 17. We then have solutions
for n = 1 thru 9 , such that n*(10**17 - 2)/19 is a 17 digit number.
This allows solutions for n = 2 thru 9.

				Lew Mammel, Jr. - BTL Indian Hill