The positive integers $a_1,a_2,...,a_n$ are such that $a_i<1000$ for all $i$. And $\mathrm{lcm}(a_i,a_j)>1000$ for all $i\neq j$. Then show that $$\sum_{i=1}^n\frac{1}{a_i}<2$$.
I am totally clueless on this one. Please help. All I have been able to do is show that $n\le 500$ as follows: There are $500$ odd numbers between $1-1000$. If there were $501$ or more, numbers than by pigeonhole principle one will divide the other which contradicts the lcm criteria i.e. $lcm(a_i,a_j)>1000>a_i$.