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$.
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.