context
.divkbaseb
(k
, b
)¶Generates an automaton that recognises the writing in base $b$ of the numbers divisible by the integer $k$.
Preconditions:
Postconditions:
See also:
import vcsn
c = vcsn.context('lal_char(0-9), b')
c.divkbaseb(3, 2)
c.divkbaseb(2, 4)
If $k$ and $b$ are coprime, then the result is known to be minimal.
div4base4 = c.divkbaseb(4, 4)
div4base4
div4base4.minimize()