Here is a solution inspired by the beautiful Gerry Myerson's one.
Let $a_n$ be a number of representations of $n$ as a sum of three distinct numbers with no matter to ordering.
Thus, easy to see that $a_1=a_2=a_3=a_4=a_5=0,$ $a_6=a_7=1$, $a_8=2$, $a_9=3$,
$a_{10}=4$, $a_{11}=5$, $a_{12}=7$, $a_{13}=8$, $a_{14}=10$, $a_{15}=12,$ $a_{16}=14,$ $a_{17}=16$.
Let $a>b>c\geq1$ be integers and $a+b+c=n$.
Thus, $$n=a+b+c\geq c+2+c+1+c=3c+3,$$ which gives $$c\leq\frac{n}{3}-1$$ and we see that $c$ goes so: $$1\leq c\leq\left[\frac{n}{3}\right]-1.$$
Now, since $$a-c+b-c=n-3c,$$ we see that $b-c$ defines a number of solutions for fixed $c$ and since
$$n-3c=a-c+b-c\geq b-c+1+b-c=2(b-c)+1,$$ we obtain
$$b-c\leq\frac{n-3c-1}{2},$$ which gives $\left[\frac{n-3c-1}{2}\right]$ solutions.
Id est, $$a_n=\sum_{c=1}^{\left[\frac{n}{3}\right]-1}\left[\frac{n-3c-1}{2}\right].$$
Now, $$a_{n+6}=\sum_{c=1}^{\left[\frac{n+6}{3}\right]-1}\left[\frac{n+6-3c-1}{2}\right]=\sum_{c=1}^{\left[\frac{n}{3}\right]+1}\left[\frac{n+5-3c}{2}\right]=$$
$$=\sum_{c=-1}^{\left[\frac{n}{3}\right]-1}\left[\frac{n-3c-1}{2}\right]=\sum_{c=1}^{\left[\frac{n}{3}\right]-1}\left[\frac{n-3c-1}{2}\right]+\left[\frac{n+2}{2}\right]+\left[\frac{n-1}{2}\right],$$ which gives
$$a_{n+6}=a_n+\left[\frac{n+2}{2}\right]+\left[\frac{n-1}{2}\right].$$
Also, $$a_{n+12}=\sum_{c=1}^{\left[\frac{n+12}{3}\right]-1}\left[\frac{n+12-3c-1}{2}\right]=\sum_{c=1}^{\left[\frac{n}{3}\right]+3}\left[\frac{n+11-3c}{2}\right]=\sum_{c=-3}^{\left[\frac{n}{3}\right]-1}\left[\frac{n-3c-1}{2}\right]=$$
$$=\sum_{c=1}^{\left[\frac{n}{3}\right]-1}\left[\frac{n-3c-1}{2}\right]+\left[\frac{n+8}{2}\right]+\left[\frac{n+5}{2}\right]+\left[\frac{n+2}{2}\right]+\left[\frac{n-1}{2}\right],$$ which gives
$$a_{n+12}=a_n+\left[\frac{n+8}{2}\right]+\left[\frac{n+5}{2}\right]+\left[\frac{n+2}{2}\right]+\left[\frac{n-1}{2}\right].$$
Thus, $$a_{n+12}-2a_{n+6}+a_n=\left[\frac{n+8}{2}\right]+\left[\frac{n+5}{2}\right]-\left[\frac{n+2}{2}\right]-\left[\frac{n-1}{2}\right]=$$
$$=\left[\frac{n+2}{2}\right]+3+\left[\frac{n-1}{2}\right]+3-\left[\frac{n+2}{2}\right]-\left[\frac{n-1}{2}\right]=6,$$
Now, we'll consider six cases.
- $n=6k$, where $k\geq1$.
Thus, for $k\geq3$ we obtain: $$6(k-2)=\sum_{i=3}^{k}\left(a_{6i}-a_{6i-6}-\left(a_{6i-6}-a_{6i-12}\right)\right)=$$
$$=a_{6k}-a_{6k-6}-(a_{12}-a_6)=a_{6k}-a_{6k-6}-(7-1),$$ which gives
$$a_{6k}-a_{6k-6}=6k-6.$$
Since for $k=2$ the last equality is also true, we see that
$$a_{6k}-a_{6k-6}=6k-6$$ is true for any integer $k\geq2$,
which gives
$$\sum_{i=2}^k(a_{6i}-a_{6i-6})=\sum_{i=2}^k6(i-1)$$ or
$$a_{6k}-a_6=6\cdot\frac{k(k-1)}{2}$$ or
$$a_{6k}=3k^2-3k+1$$ and since for $k=1$ it's also true, we obtain that
$$a_{6k}=3k^2-3k+1$$ is true for any integer $k\geq1$.
Also, $$\left[\frac{n^2-6n+12}{12}\right]=\left[\frac{36k^2-36k+12}{12}\right]=3k^2-3k+1,$$
which says that we solved our problem in this case.
- $n=6k+1$, where $k\geq1$.
In this case by the same way we obtain:
$$a_{6k+1}-a_{6k-5}=6k-5,$$ $$a_{6k+1}=3k^2-2k$$ and indeed, $$\left[\frac{n^2-6n+12}{12}\right]=\left[\frac{36k^2+12k+1-36k-6+12}{12}\right]=3k^2-2k.$$
3. $n=6k+2$, where $k\geq1$.
Here we obtain:
$$a_{6k+2}-a_{6k-4}=6k-4,$$ $$a_{6k+2}=3k^2-k$$ and $$\left[\frac{n^2-6n+12}{12}\right]=\left[\frac{36k^2+24k+4-36k-12+12}{12}\right]=3k^2-k.$$
4. $n=6k+3$, where $k\geq1$.
Here we obtain:
$$a_{6k+3}-a_{6k-3}=6k-3,$$ $$a_{6k+3}=3k^2$$ and $$\left[\frac{n^2-6n+12}{12}\right]=\left[\frac{36k^2+36k+9-36k-18+12}{12}\right]=3k^2.$$
5. $n=6k+4$, where $k\geq1$.
Here we obtain:
$$a_{6k+4}-a_{6k-2}=6k-2,$$ $$a_{6k+4}=3k^2+k$$ and $$\left[\frac{n^2-6n+12}{12}\right]=\left[\frac{36k^2+48k+16-36k-24+12}{12}\right]=3k^2+k.$$
6. $n=6k+5$, where $k\geq1$.
Here we obtain:
$$a_{6k+5}-a_{6k-1}=6k-1,$$ $$a_{6k+5}=3k^2+2k$$ and $$\left[\frac{n^2-6n+12}{12}\right]=\left[\frac{36k^2+60k+25-36k-30+12}{12}\right]=3k^2+2k$$ and we are done!
Quits really sadism!