Suppose that $n$ is a positive integer and that the set $S$ contains exactly $n$ distinct positive integers. If the mean of the elements of $S$ is equal to $\frac{2}{5}$ of the largest element of $S$ and is also equal to $\frac{7}{4}$ of the smallest element of $S$, determine the minimum possible value of $n$.
Suppose that the largest integer in $S$ is $L$, the smallest integer in $S$ is $P$, and the mean of the elements of $S$ is $m$.

We are told that $m=\frac{2}{5} L$ and $m=\frac{7}{4} P$.

Thus, $\frac{7}{4} P=\frac{2}{5} L$ or $P=\frac{8}{35} L$.

Since $P$ and $L$ are positive integers, then $L$ must be divisible by 35 .

That is, $L=35 k$ for some positive integer $k$.

From this, $P=8 k$ and $m=14 k$.

Now, the sum of the elements of $S$ is $n m=14 k n$.

But all of the elements of $S$ are positive and they include at least $P=8 k$ and $L=35 k$, whose sum is $43 k$.

Therefore, $14 k n \geq 43 k$, which means that $n \geq 4$.

If $n=4$, then the sum of the elements in $S$ is $56 k$.

This means that there are two elements in addition to $8 k$ and $35 k$ and the sum of these two additional elements is $56 k-43 k=13 k$.

But each of these elements must be at least $8 k$ and so their sum is at least $16 k$.

This is a contradiction, so there cannot be 4 elements in $S$.

If $n=5$, then the sum of the elements in $S$ is $70 k$.

This means that there are three elements in addition to $8 k$ and $35 k$ and the sum of these three additional elements is $70 k-43 k=27 k$.

If $n=5$ and $k=2$, we have $P=16$ and $L=70$ and we want the sum of the remaining three elements, which must be distinct integers larger than 16 and less than 70 , to be 54 .

This is possible with elements $17,18,19$.

In this case, $S=\{16,17,18,19,70\}$. The sum of the elements of $S$ is 140 and the average is 28 . Note that $28=\frac{7}{4} \cdot 16=\frac{2}{5} \cdot 70$.

Therefore, the minimum possible value of $n$ is 5 .

ANSWER: 5