[Math] The number of ways to represent a natural number as the sum of three different natural numbers

ceiling-and-floor-functionscombinatoricscontest-mathnatural numberstelescopic-series

Prove that the number of ways to represent a natural number $n$ as the sum of three different natural numbers is equal to $$\left[\frac{n^2-6n+12}{12}\right].$$
It was in our meeting a year ago, but I forgot, how I proved it.

Let the needed number be $a_n$, where $n\geq6$ and let $b_n$ be number of ways to represent a natural number $n$ as the sum of two different natural numbers.

Thus, $a_n=b_{n-3}+b_{n-6}+…$ because we can go from $(a,b)$, where $a<b$, to $(1,a+1,b+1)$, $(2,a+2,b+2)$

Thank you for your help!

Best Answer

If $n=r+s+t$ is a representation of a positive integer as a sum of integers which $r>s>t>0$, then $n-6=(r-3)+(s-2)+(t-1)$ is a representation of $n-6$ as a sum of integers $(r-3) \ge(s-2)\ge(t-1)\ge0$, that is a partition of $n-6$ into at most three parts. Therefore $a_n=c_{n-6}$ where $c_n$ is the number of partitions of $n$ into at most three parts.

By conjugation of partitions, $c_n$ is the number of partitions of $n$ into parts of size at most $3$. So the generating function of the $c_n$ is $$C(x)=\sum_{n=0}^\infty c_nx^n=\frac1{(1-x)(1-x^2)(1-x^3)}.$$ Now use the normal manoeuvres with rational functions to find the $n$-th term: write in partial fractions $$C(x)=\frac{A}{1-x}+\frac{B}{(1-x)^2}+\frac{C}{(1-x)^3}+ \frac{D}{1+x}+\frac{E+Fx}{1+x+x^2}$$ and go from there.