((high-low)/ difference)+1. is the formula

since it is consecutive difference = 1

(399499-8)/1=399491+1=399492

check whether it is correct?

or

Tn=a+(n-1)*d is another formula(applicable only if difference is constant throughout)

I don’t think that is what the question is asking because it is asking for the number of **digits**, not the number of **terms**.

No, it’s not. The answer is 2285882.

2 + 2x90 + 3x 900 + 4x 9000 + 5 x 90000 + 6 x (399499-10000+1) = 2285882