Base-d expansions with digits 0 to q-1