For each positive integer k, denote by S(k) the sum of the digits of k. How many positive integers n less than or equal to 999 are there for which S(n+1)S(n) is an integer?
Solution
A positive integer n less than or equal to 999 can be represented as 102a+10b+c where a,b,c are integers satisfying 0≤a,b,c≤9 and a+b+c=0. Then we have S(n)=a+b+c and S(n+1)=⎩⎨⎧a+b+c+1,a+b+1,a+1,1,if c<9⋯(i),if c=9,b<9⋯(ii),if c=b=9,a<9⋯(iii),if c=b=a=9⋯(iv).
Now, it is clear that S(n+1)S(n) is not an integer in case (i), and is the integer 999 in case (iv) above. In case (iii), we have S(n+1)S(n)=a+1a+18, which is an integer only when a=0, corresponding to the case n=99. Finally, in case (ii), S(n+1)S(n)=a+b+1a+b+9, with 0≤a≤9, 0≤b<9. If we let k=a+b, then we see that k+1k+9 is an integer only when k=0,1,3,7, from which we conclude that only possibilities for (a,b) under the case (ii) are (a,b)=(0,0),(0,1),(0,3),(0,7),(1,0),(1,2),(1,6),(2,1),(2,5),(3,0),(3,4),(4,3),(5,2),(6,1),(7,0), and these choices of (a,b) correspond to n=9,19,39,79,109,129,169,219,259,309,349,439,529,619,709, respectively. These, together with the numbers 99 and 999 found above, give 17 integers satisfying the condition of the problem.
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.
Source: MathNet,
licensed CC-BY-4.0.
Statement and solution reproduced as published; topic and difficulty added by this site.