Problem:
Find the number of integers such that the following three conditions all hold:
- is a multiple of
-
- When is written as an integer in base with no leading s (i.e. no s at the very left), its rightmost digit is strictly greater than its leftmost digit.
Solution
Solution:
We will work in base , so let such that . Then, based on the first two conditions, we aim to find multiples of between and . We note that
Hence, is a multiple of if and only if the sum of its digits is a multiple of . Thus, we wish to find triples with elements in such that and .
Note that if we choose and such that , there is exactly one value of modulo that would make . Once this value of is fixed, then there are two possibilities for unless , in which case there are three possibilities. Thus, our answer is twice the number of ways to choose and such that plus the number of ways to choose and such that and (to account for the extra choice for the value of ).
Note that the number of ways to choose is just since any choice of two digits yields exactly one way to order them. The number of ways to choose and can be found by listing: , for such pairings.
Hence, the total is possibilities for .