Let $s(n)$ denote the sum of the digits of $n.$ Then find the maximum remainder when $n$ is divided by $s(n)$ if $n$ is a two digit number.
[Math] Remainder when a number is divided by its sum of the digits.
elementary-number-theory
Related Question
- [Math] Find the remainder when a large number is divided by 35.
- [Math] If a certain number is divided by the sum of its two digits, how to find it from quotient and remainder
- [Math] Which is the largest three digit number which when divided by 6 leaves the remainder 5 and when divided by 5 leaves the remainder 3
- 12345678910111213…….201520162017, what is the remainder when this number is divided by 11
Best Answer
For two-digit numbers, the largest digit sum is $18$, which only occurs for $n=99$, but $99\bmod18=9$. This rules out $17$ as a possible answer for the largest remainder.
The digit sum $17$ occurs only for $n=98$ and $n=89$. But $98\bmod17=13$ and $89\bmod17=4$, which rules out $16$ as a possible answer.
The digit sum $16$ occurs for $97$, $88$, and $79$. Testing these, we find
$$\begin{align} 97\bmod16&=1\\ 88\bmod16&=8\\ 79\bmod16&=15 \end{align}$$
and there we have it: $15$ is the largest possible remainder (and occurs at $n=79$).
Given the erratic nature of the sequence of remainders, I don't see any easy alternative to this kind of case by case approach if, for example, you ask the same question for three-digit numbers.