Performance enhancement: 11 s -> 0.16 s for (n=6, base=20)
Simplify