# Crossing out a digit

Find the largest integer $N$ whose decimal representation has the following properties:

• The rightmost digit in the decimal representation is not $0$.
• There exists a digit $d$ in the decimal representation which is not the leftmost digit, so that crossing out this digit $d$ yields the decimal representation of an integer divisor of $N$.

Example:
The integer $121$ is not divisible by $10$, and crossing out the digit $2$ yields the divisor $11$ of $121$.

• Do you know if $N$ is a finite number? (I'm not asking if it is or not.) – ghosts_in_the_code Oct 24 '15 at 14:52
• Yes, $N$ is finite. (To ensure finiteness, one needs these conditions on the leftmost and rightmost digit.) – Gamow Oct 24 '15 at 14:53

Answer: $180625 = 17*10625$.

Proof:

we have:

$N = a*10^{n+1}+d*10^n+c = k*(a*10^n+c)$, $a,d,c,k$ is positive integers. $d < 10; c < 10^n; k > 1$.

move some terms:

$(10-k)*a*10^n + d*10^n = (k-1)*c$

Now. First of all we need to maximise $n$. In that case $(k-1)*c$ must be divisible by maximum power of 10. The only limit is that $c$ is not divisible by 10 and $k <= 19$ (otherwise left part of equation become negative). Then $k = 2^4+1 = 17, c = 5^4*c'$ and:

$(-7)*a*10^n + d*10^n = c'*10^4$

max $n$ is 4, then:

$-7*a + d = c'$
$7*a = d - c'$

Now $a$ must be maximised. $d <= 9$, then $a_{max} = 1$, also $c'_{max} = 1$, since $c'_{max}*5^4 = c$ is not divisible by 10.
That means $a = 1, d = 8, c = 1; N = 180000+1*5^4 = 180625$

• What if $c$ is divisible by 2 and $k-1$ is divisible by 5 but not 10? – Zandar Oct 24 '15 at 20:01
• @Zandar, thanks! I changed my answer a little bit:) – klm123 Oct 24 '15 at 20:34