Browse · MathNet
PrintSAUDI ARABIAN MATHEMATICAL COMPETITIONS
Saudi Arabia counting and probability
Problem
How many ways are there to insert plus signs between the digits of number which includes thirty digits so that the result will be a multiple of ?
Solution
Let be the final sum, then the necessary conditions are , . One can check that for every positive integer then which implies that for all ways to insert the plus signs, we have Then the condition that divisible by is always satisfied. Suppose that we inserted signs in total, then we have parts. Each part is a positive integer that ends with so the rightmost digit of is equal to or congruent to modulo . Then we must have . It is easy to see that the given condition is also the sufficiency condition. Denote as the number of digits of each part that partitioned from signs then This equation has solutions. Therefore the number of ways to insert the plus signs is .
Final answer
binom(30,10) + 1
Techniques
Recursion, bijectionDivisibility / Factorization