combinatoriek (som van 3 cijfers)

Opgave - IMOSL 2009 dag 1 vraag 9

Voor een geheel getal $n\geq 2$, noemen we $N(n)$ het maximum aantal triples $(a_i, b_i, c_i)$, $i=1, \ldots, N(n)$, bestaande uit natuurlijke getallen $a_i$, $b_i$ en $c_i$ zodat geldt dat:
$a_i+b_i+c_i=n \forall i \in \{1, \ldots, N(n)\}$,
als $i\neq j$ geldt $a_i\neq a_j$, $b_i\neq b_j$ en $c_i\neq c_j$
Vind $N(n).$