COMC 2017 C Problem 1

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).

(a) Determine P(2017).
(b) Determine all numbers n such that P(n)=4.
(c) Determine with an explanation whether there exists a number n for which P(n)-P(n+1)> 50.