Problem:
How many ordered sequences of 36 digits have the property that summing the digits to get a number and taking the last digit of the sum results in a digit which is not in our original sequence? (Digits range from 0 to 9.)
Problem:
How many ordered sequences of 36 digits have the property that summing the digits to get a number and taking the last digit of the sum results in a digit which is not in our original sequence? (Digits range from 0 to 9.)
Solution:
We will solve this problem for 36 replaced by . We use to denote and to denote the last digit of the sum of the digits of .
Let be the set of all sequences of digits and let be the set of digit sequences such that , the digit of . The quantity we are asked to compute is equal to . We use the principle of inclusion-exclusion to compute this:
Note that a digit sequence is in if and only if the digits which are not sum to a multiple of 10. This gives that as there are 10 ways to pick the digit and ways to pick the other digits.
Similarly, given a subset , we can perform a similar analysis. If a string is in , we must have that for all . There are 10 ways to pick , which determines for all . From there, there are ways to pick the remaining digits as if we fix all but one, the last digit is uniquely determined. This gives choices.
However, this breaks down when , as not all choices of lead to any valid solutions. When , and we require that the last digit of is , which happens for values of .
We now compare our expression from the principle of inclusion-exclusion to the binomial expansion of . By the binomial theorem,
These agree on every term except for the term where . In this case, we need to add an extra and subtract .
Thus our final value for is , which is for .