First note that as
,
and
are all non-negative, the values of
,
and
are all odd. However, the sum
is even, so we deduce
that
cannot be even and hence
, that is
.
Now, for all positive integer values of
and
, the units digit of
is 5 +1 +1, that is 7. So the units digit of
is 9 and we deduce that
since 7, 49 and 343 are the only positive integer powers of7 less than 2006.
We now have
, that is
.
The only positive integer powers of 11 less than 2006 are 11, 121 and 1331.
These would require the value of
to be 1945, 1835 and 625, and of these
only 625 is a positive integer power of 5.
So
. Therefore
= 4 + 0 + 2 +3 = 9.