Skip to main content
OlympiadHQ

Browse · MathNet

Print

Japan 2007

Japan 2007 counting and probability

Problem

In how many ways can be written as a sum of nonnegative powers of ? (We consider two ways same if they differ only in the order of numbers.)
Solution
Let be the number of ways to write as sum of nonnegative powers of and . We can write as sum of nonnegative powers of with s iff is divisible by . Let , then the number of ways to write as sum of nonnegative powers of with s is equal to write as sum of positive powers of , and that is equal to . So we get We can compute by this relation. First we get . And from , we get . Applying the relation one more time we get From and , we get .
Final answer
402

Techniques

Recursion, bijection