This is equivalent to find the largest set such that no two integers can
multiple to a total square.
Here is a largest set of 17 numbers:
1,
2, 3, 4, 6,
5, 15,
7, 21,
11, 22,
13, 26,
17, 19, 23, 29
So the answer to the question is 18.