Let S(n) denote the sum of digits of the integer n. Over all positive integers, the minimum and maximum values of S(n)/S(5n) are X and Y, respectively. The value of X+Y can be written as a/b , where a and b are coprime positive integers. What is the value of a+b?

16

To find the values of X and Y, we need to analyze the minimum and maximum possible sums of digits in the numerator and denominator.

First, let's consider the denominator, S(5n). When we multiply a number n by 5, the sum of its digits is simply multiplied by 5. This is because each digit is being raised to the power of 0 (5^0 = 1) during the unit's place, so it stays the same while being multiplied by 5. Hence, the denominator, S(5n), will be 5 times the sum of digits in n.

Now, let's analyze the numerator, S(n). The sum of digits in n can vary depending on the number itself. However, for positive integers, the minimum sum of digits is 1 and occurs when n = 1, while the maximum sum of digits is 9 and occurs when n = 9999 (largest 4-digit number).

Therefore, we can determine the minimum and maximum values of S(n) and S(5n) as follows:

For the minimum case:
- S(n) = 1 (minimum sum of digits)
- S(5n) = 5 (5 times the sum of digits in n)

For the maximum case:
- S(n) = 9 (maximum sum of digits)
- S(5n) = 45 (5 times the sum of digits in n)

Thus, the minimum value of S(n)/S(5n) is 1/5 and the maximum value is 9/45.

To simplify X + Y = 1/5 + 9/45, we need to find a common denominator for the fractions, which is 45.

1/5 is equal to 9/45, so we can rewrite the equation as:

X + Y = 9/45 + 9/45 = 18/45

Now we can notice that 18/45 can be reduced by dividing both the numerator and denominator by their greatest common divisor, which is 9.

18/45 = (18 ÷ 9)/(45 ÷ 9) = 2/5

Therefore, a = 2 and b = 5. The sum a + b = 2 + 5 = 7.

Hence, the value of a + b is 7.