Constructing a deterministic one way infinite single tape Turing machine
Here is a rather reasonable way to implement this in Turing machines:


Sort the bs and the as so that the input tape is composed of bs followed by as.
Repeatedly perform the following operation: remove $B$ as from the end of the input tape, where $B$ is the number of bs.
Accept if you never got stuck perform an iteration of the previous step.


The second step can be implemented without explicitly counting $B$. For the first step, you can implement the simplest algorithm you can think of, say bubble sort.