three digit numbers are to be formed from digits 0,1,2,3...9 if repetitionis allowed.

(a) how many of such numbers can be formed?
(b)how manyof the numbers in(a)are divisible by 3 and how many of 9?
(c) find the sum of all the numbers divisible by 3 but not divisible by 9

1 answer

Effectively, you have all the numbers form 100 to 999 , (can't start with 0 or else we have a 2 digit number)
There would be 999-100 + 1 = 900 of them

or

using the standard permutation method
choices for 1 digit = 9
choices for 2nd digit = 10
choices for 3rd digit = 10
number of cases = 9x10x10 = 900

those divisible by 3 are:
102, 105, 108 , ... 999
they form an arithmetic sequence with
a = 102, d = 3
what term number is 999?
102 + (n-1)(3) = 999
3n - 3 = 897
3n = 900
n = 300 , makes sense that 1/3 of them would be divisible by 3

those divisible by 9:
108, 117, 126,...,999
108 + (n-1)(9) = 999
9n - 9 = 891
9n = 900
n = 100 , or 1/9 of the 900 are divisible by 9

using the formula:
sum of n terms of an AS = (n/2)(first + last)

sum of the multiples of 3
= 150(102 + 999) = 165150

sum of multiples of 9
= 50(108 + 999) = 55350

sum of all divisible by 3 but not by 9
= 165150 - 55350 = 109800