# 1971 Canadian MO Problems/Problem 7

## Problem

Let $n$ be a five digit number (whose first digit is non-zero) and let $m$ be the four digit number formed from n by removing its middle digit. Determine all $n$ such that $n/m$ is an integer.

## Solution

Let $n=10000a+1000b+100c+10d+e$ and $m=1000a+100b+10d+e$, where $a$, $b$, $c$, $d$, and $e$ are base-10 digits and $a\neq 0$. If $n/m$ is an integer, then $m|n$, or

$\[1000a+100b+10d+e|10000a+1000b+100c+10d+e.\]$

This implies that

$\[1000a+100b+10d+e|9000a+900b+100c.\]$

Clearly we have that $8(1000a+100b+10d+e)<9000a+900b+100c<10(1000a+100b+10d+e)$, as $a$ is positive. Therefore, this quotient must be equal to 9 (note that this does not mean $n/m = 9$), and

$\[9000a+900b+90d+9e=9000a+900b+100c.\]$

This simplifies to $90d+9e=100c$. The only way that this could happen is that $c=0$. Then $d=e=0$. Therefore the only values of $n$ such that $n/m$ is an integer are multiples of 1000. It is not hard to show that these are all acceptable values.