Source: 2017 Canadian Open Math Challenge, Problem C1 For a positive integer $n$, we define function $P(n)$ to be the sum of the digits of $n$ plus the number of digits of $n$. For example, $P(45) = 4 + 5 + 2 = 11$. (Note that the first digit of $n$ reading from left to right, cannot be $0$). $\qquad$(a) Determine $P(2017)$. $\qquad$(b) Determine all numbers $n$ such that $P(n) = 4$. $\qquad$(c) Determine with an explanation whether there exists a number $n$ for which $P(n) - P(n + 1) > 50$.
Problem
Source:
Tags: Comc, 2017 COMC
12.10.2018 19:25
(a) 2+0+1+7+4=14 (b) we know that $ P(n)<1000$ and only one $n$ for each increase in digits. We can easily check that $n=3,11, 20, 100$ (c) yes if $n=9999999999999999999$ and so many other values where $n$ consists of only $9s$
13.10.2018 02:57
Are you missing 20 for b?
13.10.2018 04:46
mhm, im pretty sure there are two more
13.10.2018 05:41
lucastarfruit wrote: Are you missing 20 for b? Thanks yes
13.10.2018 05:55
b) consider a 2 digit number $(ab)$ so $P(n)=a+b+2=4$ or, $P(n)-2= a+b+=2$ so $(a,b)=(1,1),(2,0)$ and let $n$ be a three digit number $abc$ the $P(n)=a+b+c+3=4$ or $a+b+c=1$ so $(a,b,c)=(1,00)$
13.10.2018 12:46
Also note that the smallest possible value that satisfies (c) is $999999$ because $9(6)+6=60,60-(1+7)>50$ because $999999+1=1000000$ and we check with $P(999999)$ and $P(1000000)$no value below this will work because $P(n)=9(x)+x-P(n+1)<50$ where $x<6$.