# Equation representing the sum of all numbers less than N such that their hundreds digit is a 3

I am trying to create an equation to represent the summation of all positive integers less than N such that their hundreds digit is a 3. I've made a partial equation but I'm not sure how to complete it nor if it is correct. I've tried to take advantage of the fact that

$\displaystyle \sum_{k=1300}^{1399}k = (100)(1000)+\sum_{k=300}^{399}$k

Using this, I made part of an equation:

Let $N = x(10^n) + y(10^4) + z(10^3) + u(10^2) + v(10^1) + w$

$(n >= 5)$

$\displaystyle \sum_{m=0}^x \{ m\displaystyle \sum_{a=0}^9[a\cdot10^{n-1} + \displaystyle \sum_{b=3}^{n-2}(99\cdot10^b)+\displaystyle \sum_{k=300}^{399}]\}$

This is the equation I made so far. I know it is not yet complete but I am not sure if this is correct nor do I know how to continue.

• Your fact is wrong, Even $1399\over300$ is less than $5$ you cannot have the first sum $100000$ times the second sum... maybe you meant there is a plus sign between $1000$ and the second sigma? – cr001 Nov 2 '15 at 7:25
• Whoops there's a plus sign. Thanks for the correction. Also, what do you mean by $1399\over{1300}$? I put the summation of all numbers from 1300 to 1399. – JavaFanatic Nov 2 '15 at 7:26