# Homework Help: Proving a formula for the number of intervals contained in [1,n]

1. Feb 24, 2010

### morbius27

1. The problem statement, all variables and given/known data
Prove a simple formula for the number of closed intervals with integer endpoints contained in the interval [1,n] (including one point intervals), where n is a natural number.

3. The attempt at a solution
I know that the formula ends up being the sum of i from i=1 to i=n (this makes sense just from inspection) but I have no idea how to actually go about proving the claim.

2. Feb 24, 2010

### tiny-tim

Welcome to PF!

Hi morbius27! Welcome to PF!

Try it for n = 4 first …

write out a list of all the closed intervals …

what do you get? when you count them, can you see a pattern?

3. Feb 24, 2010

### tt2348

if you know the solution but want to prove it, use induction

4. Feb 24, 2010

### morbius27

Re: Welcome to PF!

Thanks Tiny Tim! I got the solution after doing what you said and got the pattern; it worked beautifully after that ;)