How many positive integers satisfy the condition that the product of their digits multiplied by the sum of their digits equals themselves? For example,
1 3 = ( 1 × 3 ) ( 1 + 3 )
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Thanks for the response.
I'm not sure I follow the solution. Why does it follow from 1 0 a − 1 ≤ a 9 a + 1 that a ≤ 8 4 ? And how did you use this bound on a to arrive at your solution?
Log in to reply
Just solve for when 1 0 a − 1 = a 9 a + 1 and take the ⌊ a ⌋ . I explicitly stated that this is not a solution, but rather how to come to the conclusion by narrowing the amount of numbers checked.
Log in to reply
I get ⌊ a ⌋ ≤ − 2 and 0 ≤ ⌊ a ⌋ ≤ 3 for solutions. Not sure where 8 4 comes from.
Also, given that all you know before your final step is that n < 1 0 8 5 , there's a lot of missing "narrowing" to get down to three numbers, even considering the restrictions on the digits.
Log in to reply
@Jordan Cahn – Well a can not be negative. Just graph the equations x and 9 x + 1 1 0 x − 1 then see where they intersect.
@Jordan Cahn – And on the narrowing yes I know, which is why I explicitly stated that this was not a solution.
I got 135 and 144, overlooked 1. Ed Gray
If n f is the first digit, then the slightly more specific statement n ≥ 1 0 a − 1 n f is also true. If you then divide by n f when doing the inequalities, you end up with 1 0 a − 1 ≤ a 9 a , which gives a ≤ 6 0 . It's not great, but still a substantial improvement on 84.
This if fun to consider in other number bases. For base 2 the answer is trivial -- there is only 1. (Therefore I answered the question "1" because that is the only solution that holds in all number bases). What about base 3? Note that using the more restrictive criterion above, the maximum number of digits for base 3 is 7, and for base 4, 13. Base 4 and base 5 have nontrivial solutions -- care to find them? Note that for bases that are a composite number, the "trick" of reducing the calculations by eliminating powers of the radix (base) itself could help, but I haven't implemented an efficient algorithm yet.
Famously known as Sum Product Numbers ..........
Problem Loading...
Note Loading...
Set Loading...
This is not a solution, but rather an explanation of how mathematician D. Wilson arrived at this result. Denote the number as n . Define the number of digits it has as a and its digits n 1 n 2 . . . n a . Then we know that
n ≥ 1 0 a − 1
We also know that
k = 1 ∏ a n k ≤ 9 a
and
k = 1 ∑ a n k ≤ 9 a
Then by definition,
1 0 a − 1 ≤ n = k = 1 ∏ a n k ⋅ k = 1 ∑ a n k ≤ 9 a ⋅ 9 a 1 0 a − 1 ≤ a 9 a + 1 a ≤ 8 4
Therefore,
k = 1 ∑ a n k ≤ 9 a ≤ 7 5 6 k = 1 ∏ a n k ≤ n < 1 0 8 5
We know that the product of the digits will have the prime factorization 2 w 3 x 5 y 7 z . However if n m o d 1 0 = 0 then 1 0 also divides ∏ k = 1 a n k . Hence, n ends in 0 and ∏ k = 1 a n k = 0 . So ∏ k = 1 a n k = 2 w 3 x 7 z or . ∏ k = 1 a n k = 3 x 5 y 7 z . This reduces the amount of numbers to check by a considerable amount. It turns out there are only three such numbers, 1 , 1 3 5 , 1 4 4 . There might be an insight I am lacking that makes further reduction in the numbers to check, so I posted the problem in case someone can provide such insight.