How many four-digit integers between 5000 and 6000 are there for which the thousands digit equals the sum of the other three digits? (The thousands digit of 5124 is 5.)
(A) 5
(B) 15
(C) 21
(D) 30
(E) 12
Between 5000 and 6000 , every integer except for 6000 has thousands digit equal to 5 .

Note that the number 6000 does not have the desired property.

Thus, we are looking for integers $5 x y z$ with $x+y+z=5$.

The possible combinations of three digits for $x, y$ and $z$ are: $5,0,0 ; 4,1,0 ; 3,2,0 ; 3,1,1$; $2,2,1$.

A combination of three different digits (like 4, 1,0) can be arranged in 6 ways: 410, 401, 140, 104, 041, 014.

A combination of three digits with one repeated (like $5,0,0$ ) can be arranged in 3 ways: 500, 050, 005 .

Therefore, 5, 0, 0 and 3, 1, 1 and 2, 2, 1 each give 3 integers, and 4, 1, 0 and 3, 2, 0 each give 6 integers.

So the number of integers with the desired property is $3(3)+2(6)=21$.

ANSWER: $(\mathrm{C})$