Finding the maximum value of $abcdef$ given certain conditions of the divisibility of ab, abc, abcd, ...

109 Views Asked by At

What is the largest possible integer $abcdef$ that can be formed from the digits $1,2,3,4,5,6$ each used exactly once if abcdef is divisible by 6, abcde is dividible by 5, abcd by 4, abc by 3, and ab by 2?

By reason and elimination,

e=5

b,d,f can be 2,4,6

a,c can be 1,3

Is there a shorter way than just checking the divisibility of the 12 possibilities formed here to 6? Or am I just left with substitution and checking?

2

There are 2 best solutions below

2
On BEST ANSWER

For $abcdef$ to be divisible by $6$, $f$ must be even and $a+b+c+d+e+f$ divisible by $3$ (which it is). Similarly $d$ and $b$ are even, and that will leave $a, c, e$ to be odd.

For $abcde$ to be divisible by $5$, $e$ must be $5$.

For $abcd$ to be divisible by $4$ when $c$ is odd, $d$ must be even but not divisible by $4$. Thus $d$ is $2$ or $6$.

For $abc$ to be divisible by $3$, $a+b+c$ is divisible by $3$. Now we already know $a$ and $c$ are $1$ and $3$ (not necessarily in that order), so $b+1$ is divisible by $3$. The only possibility is $b=2$. And then $d=6$ and $f=4$.

Thus the only numbers satisfying the constraints are $123654$ and $321654$.

0
On

Yes. First you know that $$a+b+c=4+b$$ is divisible by $3$. Therefore $b=2$.

This reduces the problem to $2\times 2=4$ cases. These can also be reduced fast:

You are looking for the largest number, so you want $a$ to be as large as possible. That means that if we can find a number which starts with $a=3$ we can disregard $a=1$.

So choosing $a=3$, we have $c=1$ and hence the number starts with $321$.

As $321d$ is divisible by $4$ you have $d=6$, which leaves $e=4$.