Enumerative Combinatorial Question on polygons

Question: Suppose $A_1, A_2, \cdots , A_{20}$ are the sides of a regular $20-$gon. How many non isosceles (scalene) triangles can be formed whose vertices are asking the vertices of the polygon but whose sides are not the sides of the polygon?

$\boxed{\text {The answer is } 640}$

I have solved it in this way:

The number of triangles (any $3$ points) that can be chosen $= {20 \choose 3} \tag1$

Number of triangles chosen having at least one (one or two) side(s) which form the sides of the $20-$gon $= 17*20 = 340 \tag2$

We have got the count $\left ({20\choose 3}-340\right)$ of the triangles which are not sides of the polygon.

Number of isosceles triangles :

If $A$ and $B$ are two points, then if there are $k$ points between $A$ and $B$, then we call it a $k-\text {isosceles triangle}$. Since there are a total of $20$ sides, if $A$ and $B$ are two points and if there are $k$ points in between and we have another point that forms the third vertex of the triangle, there there are remaining $20-3-k=17-k$ points on the polygon. But since it's an isosceles triangle, there will be equal number of points on each remainning side $\implies 17-k = \text {even}$. Thus $k$ is odd. Hence, there can be $1-, 3-, 5-, 7- \text {isosceles triangles}$. A $9-\text {isosceles triangle}$ isn't possible since the chosen points will be diametrically opposite. And above $9$ will lead to be rotation of the chosen isosceles triangles. By any means, we are not getting any equilateral triangle that there will be a multiple count of the isosceles (since count of isosceles gives the count of the equilaterals).

For two points $A,B$ there can exist two isosceles traingles- diametrically opposite points form those two Triangles. ( For a $1-\text {isosceles triangle}$, that doesn't happen ) So, count off the $k-\text {isosceles triangle}$. There is a total of $\text 20*4 + 20*3 = 140$ points.

Hence, we get ${20 \choose 3}-340-140 = 1140-340-140=660$.

My answers differs by $20$ from the original answer. Please check.

You're mistaken when you say that "a $9-\text{isosceles triangle}$ isn't possible since the chosen points will be diametrically opposite" - they won't! Diametrically opposite points on a $20-$gon actually dist $10$, not $9$. The $20$ triangles you forgot to subtract from the total come from here. Otherwise your proof is perfect.
• According to what I've defined as a $k-\text {isosceles triangle}$, a $9-$ isosceles means a triangle $ABC$ which has $9$ points between $AB$. Isn't it that $9$ points on either side (bcoz $9+9+2=20$) means those are diametrically opposite points? – Mathejunior Sep 23 '17 at 19:19
• Oh, sorry, you're right. I didn't read carefully in the first place. Anyway the actual problem is that it doesn't matter whether $A$ and $B$ are diametrically opposite or not, because in either case there are exactly two isosceles triangles that have $AB$ as base. So yeah, the mistake is the same even though the reason has changed.... – cip999 Sep 23 '17 at 19:24