# 1991 AHSME Problems/Problem 26

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Problem

An $n$-digit positive integer is cute if its $n$ digits are an arrangement of the set $\{1,2,...,n\}$ and its first $k$ digits form an integer that is divisible by $k$, for $k = 1,2,...,n$. For example, $321$ is a cute $3$-digit integer because $1$ divides $3$, $2$ divides $32$, and $3$ divides $321$. How many cute $6$-digit integers are there?

$\text{(A) } 0\quad \text{(B) } 1\quad \text{(C) } 2\quad \text{(D) } 3\quad \text{(E) } 4$

## Solution

$\fbox{C}$ Let the number be $abcdef$. We know $1$ will always divide $a$. $5$ must divide $abcde$, so $e$ must be $5$ or $0$, but we can only use the digits $1$ to $6$, so $e = 5$. $4$ must divide $abcd$, so it must divide $cd$ (the test for divisibility by 4 is that the last two digits form a number divisible by 4), and so $cd$ must be $12$, $16$, $24$, $32$, $36$, (not $52$ or $56$ as the $5$ is already used), or $64$. We know $2$ divides $ab$ so $b$ is even, $4$ divides $abcd$ so $d$ is even, and $6$ divides $abcdef$ so $f$ is even, and thus $b$, $d$, and $f$ must be $2$, $4$, and $6$ in some order, so $c$ must be odd, so $cd$ must be $12$, $16$, $32$, or $36$. Now $6$ divides $abcdef$ implies $3$ divides $abcdef$, and we know $3$ divides $abc$, so $3$ must also divide $def$, so we need a multiple of $3$ starting with $2$ or $6$, using the remaining digits. If $cd$ is $12$, then $def$ must be $243$, $234$, $246$, or $264$, but none of these work as we need $e = 5$. If $cd$ is $16$, $def$ must be $624$, $642$, $645$, or $654$, so $654$ works (it has $e=5$). If $cd$ is $32$, similarly nothing works, and if $cd$ is $36$, $651$ or $654$ works. So now we have, as possibilities, $ab1654$, $ab3651$, and $ab3654$. But clearly $ab3651$ can't work, as we need $abcdef$ to be divisible by $6$, so it must be even, so we eliminate this possibility. Now with $ab1654$, we need $b$ to be even, so it must be $2$, giving $a21654$, and then $321654$ works as $3$ does divide $321$. With $ab3654$, we get $a23654$ as $b$ is even, and then $123654$ works as $3$ divides $123$. Hence the number of such numbers is $2$: $321654$ and $123654$.