Solution:
We shall prove that the desired numbers have one of the forms 9k±1, 33(9k±1) or 36(9k±1).
Suppose that 3 does not divide a. Since n3≡0,±1(mod9), then a≡±1(mod9).
Conversely, let a≡±1(mod9). Since 9 divides 13−1 and 23+1, then there is n0 such that n03+a=3st, where s≥2 and t is not divisible by 3. We shall prove that if n1=n0+2⋅3s−1t, then 3s+1 divides n13+a. We have that
(n0+2⋅3s−1t)3+a=3st(2n02+1)+4n032s−1t2+8⋅33s−3t3
Since 3 does not divide n0, then 2n02+1 is divisible by 3. Moreover, 2s−1≥s+1 and 3s−3≥s+1. Hence n13+a is divisible by 3s+1 but 3 does not divide n1. Repeating the same argument, we get a positive integer np such that 32003 divides np3+a.
Let now 3 divides a<2003. Then a=3sb, where s≤6. Hence n is divisible by 3, i.e., n=3pn0, where p≥1 and 3 does not divide n0. If p≥3, then 39 divides n3 and does not divide a which implies that 32003 does not divide n3+a. Hence p=1 or p=2 and it is easy to see that s=3 or s=6, respectively.
In the first case we get that 32000 divides n03+b, where 3 does not divide b and 27b<2003. It follows as above that b≡±1(mod9).
In the second case we get similarly that 31997 divides n03+b, where 729b<2003 and b≡±1(mod9).
The number of the positive integers b≡±1(mod9) such that b<2003, 27b<2003 or 729b<2003 equals 2⋅222+1=445, 2⋅8+1=17 or 1, respectively. Hence the desired number is equal to 445+17+1=463.