If \(b\) is a positive integer greater than 1, and \(n\) is a positive integer,
then \(n\) can be expressed uniquely in the form
$$n = a_kb^k + a_{k-1}b^{k-1} + \ldots + a_1b + a0$$
where \(k\) is a non-negative integer, the coefficients \(a_0, a_1, \ldots, a_k\)
are non-negative integers less than \(b\), and \(a_k > 0\)
(Rosen, 1988, p.105). The function base
computes the coefficients
\(a_0, a_1, \ldots, a_k\).