2
$\begingroup$

A five-digit number $N$ is equal to $45$ times the product of its $5$ digits. Find $N$.

Please help. I am not sure how to solve this. I have a feeling it is simple

3 Answers 3

7

Let the digits of $n$ from left to right be $a,b,c,d$, and $e$, so that we’re told that

$10^4a+10^3b+10^2c+10d+e=45abcde\;.\tag{1}$

Clearly $n$ is a multiple of $5$, so $e$ is either $0$ or $5$. But obviously none of the digits is $0$, so $e=5$, and $(1)$ becomes

$10^4a+10^3b+10^2c+10d+5=225abcd$

or, after dividing through by $5$,

$2\left(10^3a+10^2b+10c+d\right)+1=45abcd\;.\tag{2}$

The lefthand side of $(2)$ is odd, so all of $a,b,c$, and $d$ must be odd as well. The one’s digit of $2\left(10^3a+10^2b+10c+d\right)+1$ is either $2d+1$ or $2d+1-10=2d-9$, depending on whether $d<5$ or not. However, the number in $(2)$ is an odd multiple of $5$, so its one’s digit is $5$, and either $2d+1=5$ or $2d-9=5$. Since $d$ is known to be odd, the former is impossible, $d=7$, and $(2)$ becomes

$20\left(10^2a+10b+c\right)+15=315abc$

or, after another division by $5$,

$4\left(10^2a+10b+c\right)+3=63abc\;.\tag{3}$

Reduce $(3)$ modulo $9$ to see that $4\left(10^2a+10b+c\right)\equiv 6\pmod 9$ and hence $10^2a+10b+c\equiv6\pmod9$, which further implies that $a+b+c\equiv6\pmod9$. We know that $a,b$, and $c$ are odd, so $a+b+c$ is odd, and therefore $a+b+c$ can only be $15$; the next larger possibility is $33$, which is too large, since $a+b+c\le3\cdot9=27$. The largest of $a,b$, and $c$ must therefore be at least $5$.

Now note that $100,000>n=45abcde=1575abc$, so $abc\le\left\lfloor\frac{100,000}{1575}\right\rfloor=63\;.$ This reduces the possibilities for $a,b$, and $c$ to $7,7,1$ (in some order) and $9,5,1$ (in some order). In the first case we have $45abcde=77175$, so $77175$ is a solution. In the second case we have $45abcde=70875$ and get no solution. The unique solution is therefore $n=77175$.

3

What's wrong with just computing it? Here's some GAP code that would give you the answer:

DecimalDigits:=function(n)   if(n=0) then return []; fi;   return Concatenation(DecimalDigits(Int(n/10)),[n mod 10]); end;;  for n in [10000..99999] do if(45*Product(DecimalDigits(n))=n) then Print(n,"\n"); fi; od; 

Here's the answer (spoiler alert):

77175

  • 1
    To answer the opening question, using brute force when it’s not necessary is less than elegant.2012-12-04
0

Note that $abcde=10000a+1000b+100c+10d+e$. Then $10000a+1000b+100c+10d+e=45a*b*c*d*e$. Restrict $\{a,b,c,d,e\}\subset \mathbb{N}$.

  • 0
    @Jeffrey: That's right. I used that to conclude that $e$ is not $0$ in my comment. Subsequently it follows (from $e=5$) that not only are the other numbers not $0$, but they can't be even because the product is odd.2012-12-04