N is a 3-digit positive integer (with no leading zeroes) divisible by 3, such that by reversing the digits of N/3 and subtracting 1 from the result, we will obtain N.
Determine all possible value(s) of N.
Bonus Question:
If the number of digits in N is > 3, with all the other conditions remaining the same, what is the minimum value of N?
Note: While a solution is trivial with the aid of a computer program, show how to derive it without one.
The only 3-digit solution is 741.
741 / 3 = 247
R(247) = 742
742 - 1 = 741
The minimum value of N where the digits in N is > 3 is 7425741.
7425741 / 3 = 2475247
R(2475247) = 7425742
7425742 - 1 = 7425741
--------
A partial analytical solution for the 3-digit solution:
Let the 3 digit number be abc. We, then, are looking for a, b, c where the following is true:
((a*100) + (b * 10) + c)/3 = ((c+1)*100) + (b*10) + a
Thus, 97a - 20b – 299c – 300 = 0; and
b must be a positive integer when b = (97a - 299c - 300)/20.
a cannot be 0.
a must be 3x than c+1, plus any carry resulting from 3x b.
The largest carry of any digit multiplied by 3 is 2 (as 9 x 3 = 27).
Thus, ...
if c = 0, a must be 5, 4, 3, 2 or 1.
if c = 1, a must be 8, 7 or 6.
if c = 2, a must be 9.
Checking each of these values by substitution...
(97[9] - 299[2] - 300)/20 = -1.25
(97[8] - 299[1] - 300)/20 = 8.85
(97[7] - 299[1] - 300)/20 = 4 = b
(97[6] - 299[1] - 300)/20 = -0.85
(97[5] - 299[0] - 300)/20 = 9.25
(97[4] - 299[0] - 300)/20 = 4.4
(97[3] - 299[0] - 300)/20 = -0.45
(97[2] - 299[0] - 300)/20 = -5.3
(97[1] - 299[0] - 300)/20 = -10.15
...we can see the only solution possible is when
a = 7, b = 4 and c = 1.
Edited on September 11, 2008, 2:00 am
|
Posted by Dej Mar
on 2008-09-10 13:45:23 |