- If $n = 2k+1$ is odd :
The triangle $A_1A_iA_j$ is obtuse at $A_1$, where $i < j$, if and only if $i \in \{2, \ldots, k+1 \}$ and $j \in \{ k+1+i, \ldots, n \}$.
Thus, for each $i \in \{2, \ldots, k+1 \}$ there are $k+1-i$ possibles values for $j$. Summing over $i$, it leads to $\displaystyle \frac {k(k-1)} 2$ obtuse triangles at $A_1$.
Similarly, there are as many obtuse triangles at $A_i$ for each $i$, and non is counted twice, since a triangle cannot have more than one obtuse angle...
Thus, there are a total of $\displaystyle \frac {(2k+1)k(k-1)} 2$ obtuse triangles in that case.
- If $n = 2k$ is even :
The triangle $A_1A_iA_j$ is obtuse at $A_1$, where $i < j$, if and only if $i \in \{2, \ldots, k \}$ and $j \in \{ k+1+i, \ldots, n \}$.
Thus, for each $i \in \{2, \ldots, k+1 \}$ there are $k-i$ possibles values for $j$. Summing over $i$, it leads to $\displaystyle \frac {(k-2)(k-1)} 2$ obtuse triangles at $A_1$.
Similarly as above, it leads to a total of $k(k-2)(k-1)$ obtuse triangles in that case.
Pierre.