Let us denote the the number of ways in which a positive integer, $n$, can be expressed as a sum of $3$ positive integers (not necessary distinct) by $W_3(n)$.
$W_3(n)$ can be evaluated using any of the following formulae:
$W_3(n)=\frac{1}{72}[6n^2-7-9(-1)^n+16\cos(\frac{2\pi}{3}n)]$, or
$W_3(n)=\left \langle \frac{1}{12}n^2 \right \rangle$, where $\left \langle m \right \rangle$ is the nearest integer to $m$ if $m$ is not an integer, and it is $m$ if $m$ is an integer.
The nearest integer function is usually denoted by $[n]$, but I have used this notation in the first formula of $W_3(n)$.
$W_3(n)$ is usually denoted by $P(n,3)$, but I used $W$ for the number of WAYS.
The two formulae above can be found in http://mathworld.wolfram.com/PartitionFunctionP.html .
How can we prove that $\frac{1}{72}[6n^2-7-9(-1)^n+16\cos(\frac{2\pi}{3}n)]=\left \langle \frac{1}{12}n^2 \right \rangle$?