×

combinatorics

How many positive integers of n digits chosen from the set {2,3,7,9} are divisible by 3 ?? ...

Note by Sayan Bose
4 years, 5 months ago

Sort by:

There is 1 integer congruent to 1, 1 congruent to 2, and 2 congruent to 0 mod 3. They are all non zero so that makes life easy on us. Define a(n), b(n) and c(n) as the number of positive integers with n digits congruent to 0,1,2 mod 3, respectively.

a(1) = 2, b(1) = 1, c(1) = 1

a(n+1) = 2a(n) + b(n) + c(n)

b(n+1) = c(n+1) = 2b(1) + c(1) + a(1)

a(2) = 6, b(2) = c(2) = 5

a(3) = 22, b(3) = c(3) = 21

This suggests that a(n) = b(n) + 1 = c(n) + 1, which is easy to prove by induction (i'll leave the proof to you).

The resulting answer would then be a(n) = ((4^n)+2)/3

- 4 years, 5 months ago

3 and 9 are divisible

- 4 years, 5 months ago

2, because 3 and 9 are divisible by 3 whereas 2 and 7 are not.

You're welcome!

- 4 years, 5 months ago

3 and 9

- 4 years, 5 months ago

y el 27?

- 4 years, 5 months ago