PUMaC 2020 Number Theory B Problem 7

We say that a positive integer n is \mathit{divable}~ if there exist positive integers 1 < a < b < n such that, if the base-a representation of n is \sum_{i=0}^{k_1} a_i a^i, and the base-b representation of n is \sum_{i=0}^{k_2} b_i b^i, then for all positive integers c > b, we have that \sum_{i=0}^{k_2} b_i c^i divides \sum_{i=0}^{k_1} a_i c^i. Find the number of non-divable n such that 1 \leq n \leq 100.