I want to create a list of 3-element subsets of $\{1,2,\cdots,12\}$ where no two elements in each subset can have difference of 1 or 11. I am trying to solve the following:
Find the number of all possible triangles that can be created by choosing 3 points of a 12-sided polygon, but no sides of the triangles are also the sides of the polygon.
The following attempt fails because it returns just a list of all subsets without restriction.
Select[Subsets[Range[12], {3}]
, (Abs[#[[1]] - #[[2]]] != 1 || Abs[#[[1]] - #[[2]]] != 11) &&
(Abs[#[[1]] - #[[3]]] != 1 || Abs[#[[1]] - #[[3]]] != 11) &&
(Abs[#[[3]] - #[[2]]] != 1 || Abs[#[[3]] - #[[2]]] != 11) &]
Edit
I just got the solution as follows, but can it be simplified?
Select[Subsets[Range[12], {3}]
, ! MemberQ[{1, 11}, Abs[#[[1]] - #[[2]]]] &&
! MemberQ[{1, 11}, Abs[#[[1]] - #[[3]]]] &&
! MemberQ[{1, 11}, Abs[#[[3]] - #[[2]]]] &] // Length