# What is the smallest positive integer that is divisible by $2$ and $3$

What is the smallest positive integer that is divisible by $2$ and $3$ that consists entirely of $2$s and $3$s, and has at least one of each?

I was wondering if there a formula or steps to approach this problem? I did it directly starting with $23, 32, 232,233,223$,... until I got what I assume is the smallest integer.

$3,222$ is divisible by both $2$ and $3$.

• A TeX nicety: putting the comma inside curly brackets will turn $3,222$ into $3{,}222$. Can you see the difference? Mar 8 '18 at 20:49
• yeah thanks for the info. Mar 8 '18 at 20:55

## 4 Answers

Isn't $2232$ smaller and divisible by both?

Method. To be even it has to end in $2$. Then it needs three of them for the digit sum to be divisible by $3$. Then put the $3$ as far to the right as possible.

• Yeah I knew it must end with a 2, i just added the other numbers for example purposes, but I see that I missed that one. Mar 8 '18 at 19:56

If you are doing it as a list, remove the odd numbers as they are not divisible by $2$.

Now to show divisibility by $3$, sum the digits. If it is divisible by $3$ then so must the number - why?

• When there are two numbers, $2+3=5$ so it doesn't hold.

• When there are three numbers, either $2+2+3=7$ or $2+3+3=8$ so it doesn't hold.

• When there are four numbers, either $2+2+2+3=9$ or $2+2+3+3=10$ or $2+3+3+3=11$ so it only holds when there are three $2$s and one $3$.

Hence $2232$ does the job.

• Oh okay, yeah I skipped 2232, since there are combinations i was aiming at a high one, i see now thanks! Mar 8 '18 at 19:55

Hint:

1. The number has to contain a number of "$2$"s that is a multiple of $3$.
2. It has to end with $2$, therefore contain at least one, therefore contain at least three $2$s.
3. The number $2232$ works.

Notice that $$2232<2322<3222$$ satisfy your conditions with the smallest being $2232$

We want the first digit from the right to be a $2$

The sum of digits is a multiple of $3$

Thus the sum of other digits is either$4$ or$7$

$4$ does not work because you have to have at least one $3$

$7$ works with $223$ so the answer is $2232$