A number is called cool if the sum of its digits is multiple of $17$ and the sum of digits of its successor is multiple of $17$. What is the smallest cool number?
Problem
Source: 2024 Portuguese MO Finals Day 1 P1
Tags: number theory
25.03.2024 02:10
Let $n$ be the answer and let $s(m)$ denote the sum of the digits of the positive integer $m.$ The last digit of $n$ must be $9$ because otherwise $s(n+1)-s(n)=1.$ The second to last digit of $n$ must be $9$ because otherwise $s(n)-s(n+1)=8.$ Clearly $n \neq 99$ and, given the above observations, we see that $n$ cannot be a three-digit number. We search $n$ among the four-digit numbers, so we search $n$ of the form $\overline{ab99}.$ The only way for $a+b+9+9$ to be divisible by $17$ is if $a+b=16,$ which yields $(a,b) \in \{(7,9),(8,8),(9,7)\}.$ After checking, we get $\boxed{n=8899}.$
25.03.2024 02:19
Let $n=a*10^m-1$ where $10 \not | a, m \geq 0$ is answer Then $s(n)=s(a)-1+9m$ and $s(n+1)=s(a) \to 17|9m-1, 17|s(a)$ And minimal such $a,m$ are $m=2,a=89$ So answer is $89*10^2-1=8899$
10.08.2024 21:53
Notice that the unit digit must be $9$, or else the sum of digits increase by $1$. If the unit digit is $9$ and the tens place is not, then the sum of digits decrease by $8$. So the tens digit must be $9$ as well Now we know that the number must end in $99$. Let it be $100k+99$, then the sum of digits of $k$ must be $16$. The smallest number with sum of digits $16$ is $79$, but that would not work, so we take $k=88$ which works. and the answer would be $8899$.
11.11.2024 15:27
Obvi last two digits r $99$, and last 3 digits arent $999$, now do sum logic to get $8899$