PASCAL 2005 Problem 24

A positive integer is called a perfect\:power if it can be written in the form a^b, where a and b are positive integers with b\ge2. For example, 32 and 125 are perfect powers because 32=2^5 and 125=5^3. The increasing sequence2,3,5,6,7,10,\dots

consists of all positive integers which are not perfect powers. The sum of the squares of the digits of the 1000th number in this sequence is

Answer Choices
A. 42
B. 26
C. 33
D. 18
E. 21