The number of triangles whose vertices are at the vertices of a regular octagon but none of whose sides is a side of the octagon is: [2024]
(1)

Total number of triangles that can be formed by using 8 vertices of the octagon =
Number of triangles having exactly one side common with the octagon =
Since, if we choose AB as the common side, then other vertices of the triangle will be either of G, F, E or D as we have exactly one common side.
So, we have i.e., such triangles.
Now, let us find the number of triangles having two common sides.
In the octagon, we have 8 ways of choosing two consecutive sides, i.e., (AB, BC), (BC, CD), (CD, DE), (DE, EF), (EF, FG), (FG, GH), (GH, HA), (HA, AB)
Number of triangles having 2 sides common with the octagon = 8
Required number of triangles =