\frac{d \cdot (b^n - 1)}{d \cdot b - 1}