By symmetry, it is sufficient to determine the number of those positive integers having digits less than or equal to 2009 that can be represented in the form a2009+b2009 by using a pair of integers a and b with the additional hypothesis a≥b.
Note also that the requirement that a2009+b2009 is positive and has digits less than or equal to 2009 is equivalent to the condition 102009>a2009+b2009>0.
Let us first show the following:
If a pair of integers (a,b) satisfies either one of the following conditions, then a2009+b2009 is positive and has digits less than or equal to 2009.
(A):1≤a≤9and−a<b≤a.
(B):a=10and−10<b<0.
We first prove the following simple lemma.
Lemma: (9/10)2009<1/3.
Proof: In fact, you can check that (9/10)n<1/3 if n≥11, but we can give a simpler proof for n≥15. Note that 95=59049 so that (9/10)5<3/5<2/3 and (2/3)3<1/3. Therefore, (9/10)15={(9/10)5}3<(2/3)3<1/3.
If the condition (A) is satisfied, then it is clear that a2009+b2009 is positive, and since its maximum value is attained when a=b=9, a2009+b2009≤2×92009<102009 by the lemma. When the condition (B) is satisfied, we have 102009=102009−02009>a2009+b2009>102009+(−1)2009=0, therefore, we conclude that under either of the conditions (A) or (B), 102009>a2009+b2009>0.
We next show that there are no other pairs (a,b), which satisfy the requirement. So, suppose that 102009>a2009+b2009>0 and a≥b. Then, we must have a≥1 and b>−a. Therefore, if 9≥a≥1, there are no solutions unless a≥b>−a. If a=10, then if b≥0 we get a2009+b2009≥102009, which contradicts the assumption, hence 0>b>−a=−10 must be satisfied. Finally, if a≥11, then it is clear that we need 0>b>−a. But then, a2009+b2009=a2009−(−b)2009≥a2009−(a−1)2009 since 0<−b≤a−1. Since
a2009−(a−1)2009={a−(a−1)}{a2008+a2007(a−1)+⋯+a(a−1)2007+(a−1)2008}>2009(a−1)2008≥2009⋅102008>102009,
we see that a≥11 cannot occur. Thus, we conclude that either (A) or (B) must be satisfied.
The number of pairs (a,b) which satisfies the condition (A) is ∑a=192a=(9+1)⋅9=90, and the number of pairs (a,b) satisfying the condition (B) is 9, so if we can show that no 2 pairs satisfying either condition (A) or (B) give the same number a2009+b2009, then we can conclude that 90+9=99 is the desired answer to the problem.
So, suppose a2009+b2009=c2009+d2009, with a≥b and c≥d. We may suppose a≥c. If a=c, then b=d. So, let us suppose 1≤c≤a−1≤8. Then, since 1−a≤b≤a and 2−a≤1−c≤d≤c≤a−1, we have a2009=c2009+d2009−b2009≤3⋅(a−1)2009. Since 2≤a≤9, we have aa−1≤98<109, and by the lemma (aa−1)2009<(109)2009<31, from which it follows that a2009≤3⋅(a−1)2009<a2009, a contradiction. Thus, the numbers a2009+b2009 for pairs (a,b) satisfying the condition (A) are distinct.
Finally, if 102009+b2009=c2009+d2009 with 0>b>−10, 10≥c≥1 and c≥d>−c, the condition c=10 forces d to be equal to b, while if 9≥c, we get 102009=c2009−b2009+d2009<3⋅92009, and we obtain a contradiction since 3⋅92009<102009 again by the lemma. Thus the numbers a2009+b2009 corresponding to the pairs satisfying the condition (B) are all distinct and different from any of those corresponding to pairs satisfying the condition (A).
Therefore, the answer is 99.