On the exponential sum with the sum of digits of hereditary base b notation