I better explain this problem with an example, $100$ would be represented as $983$ because $9^1 + 8^2 + 3^3$ is one hundred.
So how to find the relation between the number $n$ and numbers that can be used to represent $n$.
For example if given numbers from $2$ to $7$, the number $25$ can not be represented in a power base format, but if the numbers were from $2$ to $8$ then $25$ would be represented as $832$: ($8^1+3^2+2^3$).