number of 1s between 1 and 10 {excluding 1 and 10} = 0 number of 1s between 1 and 100 {excluding 1 and 100} = 19 number of 1s between 1 and 1000 {excluding 1 and 1000} = 299 number of 1s between 1 and 10000 {excluding 1 and 10000} = 3999 We can see a pattern here: The number of 1s between 1 and 10^n = n*10^(n-1) - 1. Therefore to calculate the number 1s between 1 and 10^10 : 10*10^(10 - 1) - 1 = **********.
Using all the numbers from 1 to 10, put them into pairs, so that one pair adds to 6, another pair to 7, a third pair to 9, a fourth pair to 16 and the final pair add to 17.