Number of Triples Between $1$ and $n$ The exact question is:
Let $n$ be a positive integer. Find the number of triples $(a,b,c)$ such that $1\leq a\leq b\leq c\leq n$ .
 A: Suppose $b=k$, then there are $k$ possible values for $a$ (from $1$ to $k$) and $n-k+1$ values for $c$ (from $k$ to $n$). That makes a total of $k(n-k+1)$ possibilities for each value of $k$ from $1$ to $n$:
$$\begin{align}
\sum_{k=1}^n k(n-k+1) &= (n+1)\sum_{k=1}^n k - \sum_{k=1}^n k^2\\
&= \frac{n(n+1)}{2}(n+1) - \frac{n(n+1)}{6}(2n+1)\\
&= \frac{n(n+1)}{6}(3n+3-2n-1)\\
&= \frac{n(n+1)}{6}(n+2)
\end{align}$$
(For the formulas used to solve the sums, check Faulhaber's formula)
A: It's usually best to start this kind of problem by doing some small number cases. If $n=1$ you have


*

*1,1,1


If n=2 you also have


*1,1,2

*1,2,2

*2,2,2


if n=3 you have all of the above plus


*1,1,3

*1,2,3

*1,3,3

*2,2,3

*2,3,3

*3,3,3


The sequence 1, 4, 10 is a good hint for the answer. See @Wood's answer for the full argument.
A: Three is a very small number, so we can afford to do cases. (There is a more general approach using Stars and Bars.)
Case (i) The numbers are distinct. There are $\binom{n}{3}$ ways to choose them, and then only $1$ way to line them up in order.
Case(s) (ii) The smaller two are equal, and the third is bigger, or the smallest is unique, and there is a tie for biggest. We can pick $2$ numbers in $\binom{n}{2}$ ways. Then double, for a total of $2\binom{n}{2}$.
Case (iii) All equal. There are $\binom{n}{1}$ choices. 
Add up. 
