TITLE: A set of integers whose elements all divide $2015^{200}$ but do not divide each other
QUESTION [13 upvotes]: Let $S$ be a set of natural numbers,such that each element divides $2015^{200}$ but for no two elements $a$ and $b$, $a|b$. Find the maximum number of elements in $S$ .

$2015^{200}=(5\cdot 13\cdot 31)^{200}$
Hence each element is of the form $5^p13^q31^r$ where $p,q,r$ lie between $0$ and $200$, inclusive.The given condition also says that for no two elements $5^p13^q31^r$ and $5^a13^b31^c$,$p\le a,q\le b,r\le c$.
I have tried to guess the solution by fixing the value of $a$ and then letting $b$ and $c$ run through the range of values that they are allowed to take.But I keep getting confused again and again.
I will appreciate any sort of comment,hint or answer.
EDIT:
As has been noted in the comments below,a trivial upper bound is $201^2$. But is this achievable?Can we show that it's not?Because then we may gain some insight.

REPLY [7 votes]: Note that any two distinct elements $5^{p_1} 13^{q_1} 31^{r_1}$ and $5^{p_2} 13^{q_2} 31^{r_2}$ are incomparable (neither divides the other) if $p_1 + q_1 + r_1 = p_2 + q_2 + r_2$.  So a mutually incomparable set is given by
$$
S_n = \left\{5^p 13^q 31^r \;\big\vert\; p+q+r=n;\; 0\le p,q,r \le 200\right\}
$$
for any $n$.  The size of this set is maximal when $n=300$ (*).  To show that this is the largest mutually incomparable set, we can apply Dilworth's theorem, which says that if an antichain $A$ has cardinality equal to that of a partition $P$ of the set into chains, then that antichain is maximal.  A corresponding partition here is given by (the transitive closure of) the following equivalence relation: if $x=5^p 13^q 31^r$, then 

If $p+q+r\equiv 0$ (mod $3$), $x \sim 5x$,
If $p+q+r\equiv 1$ (mod $3$), $x \sim 13x$, and
If $p+q+r\equiv 2$ (mod $3$), $x \sim 31x$.

The equivalence relation links every triple $(p,q,r)$ to a unique triple with $p+q+r=300$, and does so while staying inside the box $0\le p,q,r \le 200$.  (The latter property is key, since it distinguishes, say, $S_{300}$ from the much smaller $S_{200}$.)

Note on evaluating $|S_n|$:
Only the restrictions $p,q,r\ge 0$ apply for $0 \le n\le 200$, so the number of ways to choose $(p,q,r)$ summing to $n$ in that range is
$$|S_n|=1+2+\ldots+n+(n+1)=\frac{1}{2}(n+1)(n+2).$$  For $200<n \le 300$, we have to subtract out cases where one of the terms (and it can be only one) is larger than $200$: there are $$1+2+\ldots+(n-200)=\frac{1}{2}(n-200)(n-199)$$ cases where each of $p,q,r$ is greater than $200$.  So the total size is
$$
|S_n|=\frac{1}{2}(n+1)(n+2)-\frac{3}{2}(n-200)(n-199)
$$
in this range.  (So $|S_{300}|=30301=|S_{299}|+1$.) Finally, for $n>300$, we can use symmetry, because $|S_{n}|=|S_{600-n}|$.