23. The diagram shows a triangle with sides $n^{2}+n, 2 n+12$ and $3 n+3$. What is the sum of all the values of $n$ for which the triangle is isosceles?
A 7
B 9
C 12
D 13
E 16
20, 20 and 15.
When equation (2) is true, we have $n^{2}-2 n-3=0$, so that $(n-3)(n+1)=0$. Hence either $n=3$ or $n=-1$. However, when $n=-1$ then $3 n+3=0$, so that no triangle can be formed. There is, though, an isosceles triangle when $n=3$, as the sides of the triangle are then 12,18 and 12 .
When equation (3) is true, we have $n=9$.
But then $n^{2}+n=90$ and $3 n+3=30=2 n+12$, so that no triangle can be formed at all in this case, because $90>30+30$.
Hence the required sum is $3+4=7$.
23. A The triangle is isosceles when one of the following three equations is true:
$$
\begin{aligned}
n^{2}+n & =2 n+12 \\
n^{2}+n & =3 n+3 ; \\
2 n+12 & =3 n+3
\end{aligned}
$$

When equation (1) is true, we have $n^{2}-n-12=0$, so that $(n-4)(n+3)=0$. Hence either $n=4$ or $n=-3$. However, when $n=-3$ then $3 n+3<0$, so that no triangle can be formed. There is, though, an isosceles triangle when $n=4$, as the sides of the triangle are then