Determine the smallest integer $n \geq 0$ for which
- the decimal digit sum of n is a multiple of 17
- the decimal digit sum of $n+1$ is a multiple of 17.
No computers! The puzzle has a nice direct solution.
Answer
We know that the digit sum of $n$ is a multiple of $17$, let us write that as ($d_1$ being the least significant digit): $$d_m + d_{m-1} + ... + d_2 + d_1 = x * 17$$ If $d_1$ would be smaller than $9$ then the digit sum of $n+1$ would be $$x * 17 + 1$$ which is obviously not divisible by $17$, so $d_1$ must be $9$. If $d_2$ would be smaller than $9$, then the digit sum of $n + 1$ wold be $$x * 17 - 9 + 1 = x * 17 - 8$$ which is not divisible by $17$ again, so $d_2$ is must be $9$ well. If $d_3$ would be smaller than $9$, then the digit sum of $n + 1$ would be $$x * 17 - 9 - 9 + 1 = x*17 - 17$$ which is divisible by $17$. This means we look for the smallest number with digit sum divisible by $17$ with the last 2 digits equal $9$ and the third last digit lower than $9$. This is obviously: $$8899$$.
No comments:
Post a Comment