Possible Duplicate:
Counting subsets containing three consecutive elements (previously Summation over large values of nCr)
Suppose there are n houses and I want to calculate the number of ways of selecting any number of houses given a condition that I have to select atleast three consecutive houses. for eg.if the total number of houses is 4,so the no of ways to do the job will be 3. No of houses(n)=4 no of ways = {1,2,3},{2,3,4},{1,2,3,4}
(note:I am can only select in increasing order of the number,so {1,3,2},etc are invalid)
I was able to find that total no of ways to do the above job follows a series
Sum=1+2+5+12+28+...(n-2) terms
so when n=4,then no of ways = 1+2=3 .When n=5,then no of ways=1+2+5=8 and so on.
Now,i am looking for the formula in terms of n to calculate the sum of this series.