|$S = \{1,2,3,...,2018\}$ and $M \subseteq S$, $\forall \{x,y,z\} \subseteq M, \: xy \ne z$. What is the maximum possible value for $M$?
Attempt:
Notice the possible sets satisfying $M$ include:
$$ \{1,2,3\}, \{1,2,5,6,11 \}, ... $$
Notice that $1$ can always be included. Now let us find the greatest $x(x+1)$ that is smaller than $2018$. We find that $44 \times 45$. Notice that both $$ A = \{ 1, 44, 46, ..., 2017, 2018 \}, \:\: \text{and } B = \{1, 45, 46, ..., 2017, 2018 \} $$
satisfy $M$. The cardinality is $1975$. I am quite sure that these are the only sets satisfying $M$ with cardinality of $1975$.
Now consider set $C = \{2,3,4,...,42,43\}$. If I can show that $A$ and $B$ are the only sets with cardinality $1975$, and then showing that adding an element from $C$ to $A$ or $B$ will lead to violation of $M$, then $max(|M|)=1975$.
Now if there is another set with cardinality $1975$ other than $A$, $B$, let it be $X$. We can form an $X$, either by switching elements of $A$ with $C$, or of $B$ with $C$. Now switching one element of $A$ (one that includes $2$):
$$ \{ 1, 44, 46, ..., 2018 \} \rightarrow \{1, 2, 46, ..., 2018 \}$$
then we must also replace $46 \: or \: 2(46)$, $47 \: or \: 2(47)$, ..., and $1009 \: or \: 2018$, in total there are $1009 - 45 > |C|$ to be replaced, so it is not possible.
Now another example (includes $3$):
$$ \{ 1, 44, 46, ..., 2018 \} \rightarrow \{1, 3, 46, ..., 2018 \}$$
then we must also replace $46 \: or \: 3(46)$, $47 \: or \: 3(47)$, ..., and $672 \: or \: 2016$, in total there are $672 - 45 > |C|$ to be replaced, so it is also not possible.
Now let us consider the one that includes $43$.
$$ \{ 1, 44, 46, ..., 2018 \} \rightarrow \{1, 43, 46, ..., 2018 \}$$
then we must only replace $43(46), \: or \: 46$. But if we do replace one, it must be with one from $\{2,3,...,42\}$, and we will see that eventually we will have to replace more elements. (Now I have difficulty explaining this part)
Is my approach efficient and clear? are there better approaches?
I have another approach. We have found that $max(|M|)\ge 1975$. Instead of searching the maximum, let us consider
$$ A = \{ 1,45, 46, ..., 2017,2018 \}, \: \: B= \{44\} $$ $$ C = \{2,3,4, ..., 41,42,43 \} $$
we need to show that the minimum number of elements we must take from $S=A \cup B \cup C$ so that the new set satisfy $M$ is $43$.
Now if we clear $B \cup C$, then we just eliminate $43$ numbers such that the new set satisfy $M$. We will show that we cannot eliminate $42$ elements such that the result satisfy $M$. Now assume the contrary: among the 42 numbers, if all of them are from $C$, then we know this cannot be done because $44$ is troublesome. Now, we can write $$ 42 = \alpha + \beta, \:\: 1 < \alpha, \beta < 42 $$ where $\alpha$ is the number of elements from $C^{c}$ and $\beta$ is number of elements from $C$.
Notice that for each $x \in C$ it has at least two elements in $A$ (call it $a_{1}, a_{2}$) such that $xa_{1}, x a_{2} \in A$. $43$ has 2 "troublesome" numbers in $A$ ($43 \times 45, 43 \times 46$), $42$ has 4 "troublesome", $41$ has 5 "troublesome", and so on .. adding 1 more "troublesome".
If $\alpha =1, \beta = 41$, then there is one element left in $C$ such that it has at least two elements in $A$ that is "troublesome". Thus even if $\alpha =1$ means that one of the "troublesome" is cleared, there will still be at least one "troublesome" left. Also notice that we have not cleared the troublesome 44.
If $\alpha =2, \beta = 40$, we must substract $1$ from $\alpha$ to clear 44. Then the remaining $1$ is from $A$ and by similar reasoning we will still have "troublesome" left.
If $\alpha =3, \beta = 39$, we must substract $1$ from $\alpha$ to clear 44. Then the remaining $2$ is from $A$. We have $3$ numbers from $C$ which in total have at least $4$ "troublesome" in $A$. Thus the cleared $2$ elements from $A$ is still not enough.
.... We can see that it is not possible to clear $42$ elements or less from $S$ so that the remaining will satisfy $M$.
Thus we have shown that $max(|M|) \le 1975$. So the answer is $max(|M|)=1975$.
(second approach)
Much better. You avoid the "Assume that the set $M$ obeys some construction property" and work with a general $M$ instead.
Still have some issues:
You can tweak this approach to work. I strongly recommend thinking it over first, before reading the hidden text.
(first approach)
Your approach is currently not correct. In particular, simply showing "showing that adding an element from $C$ to $$ or $$ will lead to violation of " is not valid.
For example, you did not rule out the possibility of "adding 2 elements from $C$ but removing an element from $A$", which would increase the size by 1.