The question is unclear. I thought it meant when you write the numbers out, how many ones appear. For example, in the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, there are a total of 4 ones that appear, because 11 has 2 ones. In this case, the answer is:
(6, 1) * 10^5 + (6, 2) * 10^4 + (6, 3) * 10^3 + (6, 4) * 10^2 + (6, 5) * 10 + (6, 6) + 1
where (n, k) denotes n choose k. To see why, note that we can form six blanks: A B C D E F -- where each blank can take on values 0-9. This represents a valid number between 0 and 999 999. The total number of ways to have k ones is (6, k) * 10^(6-k). So, sum over this quantity from 1 to 6. Finally, we have to add 1 to the result, since 1 000 000 has one 1, and it can't be represented by A B C D E F.