How many subintervals have a interval of natural numbers?

239 Views Asked by At

Consider the interval: $[1,n]$

How many subintervals does this interval have?

For example, $n = 3$ has 6 subintervals: $[1], [2], [3], [1,2], [1,3], [2,3]$

1

There are 1 best solutions below

2
On BEST ANSWER

A range is specified by its largest and smallest elements, $x$ and $y$. If $x=n$, then there are $n$ choices for $y$, anything between $1$ and $n$ inclusive. If $x=(n-1)$, there are $n-1$ choices for $y$, and so on.

Continuing in this pattern, the number of ranges is $$n+(n-1)+(n-2)+\dots+2+1=n(n+1)/2.$$