N is a 4-digit positive integer such that the sum of the four digits of N equals the product of the first two digits of N and also equals the product of the last two digits of N.
Find all N's and prove there are no others.
We're looking for a, b, c, d such that:
a + b + c + d = a * b = c * d
None of them can be 0 (if one of them was 0, they'd all have to be 0, which contradicts the condition that abcd is a 4-digit positive integer).
None of them can be 1 (if, for instance, a = 1 then 1 + b + c + d > 1 * b).
Since ordering within (a,b) and (c,d), respectively, doesn't matter, let's let a <= b and c <= d. Assume that a != c. Then we'd need distinct pairs of integers in the range [2,9] with the same product. We can see by associating prime factors that the only possibilities are:
4 * 3 = 6 * 2
4 * 4 = 8 * 2
6 * 3 = 9 * 2
6 * 4 = 8 * 3
6 * 6 = 9 * 4
In none of those cases do the four digits sum to their product. Thus a = c and b = d.
So now we have 2*a + 2*b = a*b.
If a = b, then we have 4*a = a*a, so a = 4 and the solution is 4444. 4 is an upper bound on a since we assumed a < b and if they are both > 4 then the product will exceed twice their sum.
If a = 3, then we have 6 + 2*b = 3*b so b = 6, and solutions are 3636, 3663, 6336, and 6363.
If a = 2 then we have 4 + 2*b = 2*b so there are no additional valid solutions.
|
Posted by tomarken
on 2014-06-05 17:19:25 |