Count all positive integers less than 100000 with at least two consecutive 1s? Okay, aforementioned was the problem:
We need to count all the positive integers with at least two consecutive ones.
The way I thought about it was:
There are $10^{5}$ ways to have numbers that are less than 100 000. Now from these, I need to subtract the number of numbers which have either no consecutive ones or one pair of consecutive ones. And we can do that by saying:
Number of no consecutive ones: ....
But this doesn't work. How to think about the problem in a easy way?Can someone help?

Exactly 2 1's?
What is the number of 5 digit numbers with 2 1's?
$1^2\cdot9^3\cdot{5\choose 2}$
How many of those have the 2 1's next to each other?  How many locations are there for the first 1?
$1^2\cdot9^3\cdot{4\choose 1}$
3 ones
$1^3\cdot9^2\cdot{5\choose 3}$
And one of ${5\choose 3}$ has the 1's all separated by an intervening digit.
$1^3\cdot 9^2\cdot({5\choose 3}-1)$
4 1's and 5 1's
$1^4*9^1*{5\choose 4}$ and $1^5*9^0*{5\choose 5},$ respectively.
$4\cdot 9^3 + 9\cdot 9^2 + 5\cdot 9 + 1 = 3691$
