# Find the smallest positive integer containing only the digits $2$ and $3$, and at least one of each, that is divisible by both $2$ and $3$.

Math Help for Algebra I (word problem)

Find the smallest positive integer containing only the digits $2$ and $3$, and at least one of each, that is divisible by both $2$ and $3$.

• Do you know how to tell whether a number is divisible by $2$? What about $3$? – Arthur Oct 27 '16 at 20:03

Let $n$ such number, by hypothesis $2$ and $3$ divides $n$. This means that $n$ is even and since $n$ only can have digits $2$ and $3$, $n$ must end in $2$. On the other the sum of the digits of $n$ must be multiple of $3$. Because sums of numbers $3$ gives us a multiple of $3$, then the sum of numbers $2$ also has to be multiple of $3$. We have $2+2+2=6$, so $3$ is the minimum number of $2$'s we need to have a multiple $3$. Therefore the smallest number is $n=2232$.

• I had misread the question and posted an incorrect answer, then foolishly criticized yours. My mistake. +1 – The Count Oct 27 '16 at 20:14
• I using the hypothesis of the problem. Such number only contains digits $2$ and $3$. 132 is not a counterexample. – Xam Oct 27 '16 at 20:14
• see my comment above. I thought you might see my previous comment before I got to change it. Apologies. Still, perhaps it might help a young student to remove the division notation? – The Count Oct 27 '16 at 20:15
• @TheCount ok, don't worry. I edited my answer. – Xam Oct 27 '16 at 20:17

If it's divisible by $2$ the last digit must be and even number. If the digits are only $2,3$ the last digit must be $2$.

If it is divisible but $3$ the digits must add up to a multiple of $3$. It has $2$ and $3$. Those add to $3+2=5$. That is not divisible by $3$ so we must add a third digit. If we add a $2$ we get $3+2+2 = 7$ and if we add a $3$ we get $3+2+3=8$. Neither of those are divisible by $3$ so we must add a third and a fourth digit.

If we add two $2$s, we have $3+2+2+2=9$. If we add two $3$s we get $3+2+3+3=11$. If we add a $2$ and a $3$ we get $3+2+3+2=10$. Only $3+2+2+2 = 9$ is divisible by $3$.

To get a number as small as possible we want as few digits as possible so we want the digits $3,2,2,2$. The smallest number with those digits is $2223$ but that doesn't end with $2$.

So the smallest number with those digits that ends in $2$ is $2232$.

$2232 = 2*1116$ and $2232 = 3*744$. This is the smallest such number.