MAT Math Problem

 




The function F(n) is defined for all positive integers as follows: F(1) = 0 and for all n ≥ 2,

F(n) = F(n - 1) + 2 if 2 divides n but 3 does not divide n;
F(n) = F(n - 1) + 3 if 3 divides n but 2 does not divide n;
F(n) = F(n - 1) + 4 if 2 and 3 both divide n;
F(n) = F(n - 1) if neither 2 nor 3 divides n.

The value of F(6000) equals:

(a) 9827, (b) 10121, (c) 11000, (d) 12300, (e) 12352.

Solution:
Between 1 and 6000 there are 2000 values which are divisible by 2 but not by 3, 1000 values which are divisible by 3 but not by 2 and 1000 values which are divisible by 3 and by 2.

f(6000) = 2 * 2000 + 3 * 1000 + 4 * 1000 = 4000 + 3000 + 4000 = 11000.