Let $A_1,A_2,.....,A_{18}$ be the vertices of a regular polygon with $18$ sides. How many of the triangles $\Delta A_iA_jA_k,1\le i<j<k\le 18$, are isosceles but not equilateral?
My Attempt:
We consider a regular $18-$ gon. If we have to choose the vertex of an isoceles triangle, we find that we have $18$ possible vertices (of the polygon) to choose from. Now, we choose a particular vertex and label it $0$ and the 1st 9 vertices to the left of $0$ as $1,2,3,...,9$ respectively and the first $8$ vertices from the right of $0$ as $-1,-2,...,-8$ respectively. So, we find that, if we choose any vertex $|i|$ (,where $i\in\{1,2,...,8,-1,...,-8\}$) then the only possible choice of the third vertex should be $\text{sign}(-i)(|i|)$ so that three vertices forms an isosceles triangle. But then, we can't choose the vertex $9$ as, then, whichever vertex we choose as the third vertex of the desired triangle, the triangle won't ever be an isoceles one. So, we see, that we can choose the 2nd vertex $i$ of the isosceles triangle in $8$ ways and for each possible choice of $i$ the third vertex becomes fixed.( So, we see, that the remaining two vertices of the isoceles triangle can be any of the $8$ possible pairs $(1,-1),(2,-2),...,(8,-8)$.) So, the total number of ways to generate isosceles triangles is $18.8=144$ ways.
However, the answer given is $18.7=126$ isoceles triangles are possible. I find my way of solving reasonable, and don't appear to have any errors to me. It would be helpful, if anyone points out the mistake I made.
Among $(1,−1),(2,−2),...,(8,−8)$, you must eliminate $(6,−6)$ which gives an equilateral triangle.
For the general case of a $n$-gon :
$$\begin{array}{c|c|c|c} n&\text{mult. of }2&\text{mult. of }3&Formula\\ \hline &T&T&n(\frac{n-2}{2}\color{red}{-1})\\ &T&F&n(\frac{n-2}{2})\\ &F&T&n(\frac{n-1}{2}\color{red}{-1})\\ &F&F&n(\frac{n-1}{2}) \end{array}$$
(the $\color{red}{-1}$ meaning that we "uncount" the equilateral triangles)
Explanations for the first case, for example : if $n=6m$, with your notations, we can use numbering $(1,-1)... (3m-1,3m-1)$ minus case $(2m,-2m)$ (equilateral triangle) giving a total number $6m(3m-2).$