sum(k=0..n-1) (10^k * d)