find the the greatest value of $m$ such that $\text{lcm}(1,2,3,..,n)=\text{lcm}(m,m+1,..,n).$ I am stuck and unable to proceed. Value of n can be very large. For eg: if $n=6,\ \text{lcm}(1,2,...,6)=60$, so answer will be $4$ in this case.  
Since $\text{lcm}(2,3,4,5,6)=60,\ \text{lcm}(3,4,5,6)=60,\ \text{lcm}(4,5,6)=60$ and $\text{lcm}(5,6)=30...$ so largest $m$ in this case will be $4$.   
So in the question I am given any value of $n$ in range $1$ to $10^9$  and I need to tell the largest value of $m$.

For a fixed $n$, assume the all the prime numbers not greater than $n$ are $p_1,p_2,\dots.p_r$. Let 
$$\alpha_i=\text{ the largest integer $j$ such that }[\frac{n}{p_i^j}]>0,$$
then $D=\text{lcm}(1,2,\dots,n)=\prod_{i=1}^rp_i^{\alpha_i}$.
Now, let $m_i=[\frac{n}{p_i^{\alpha_i}}]$, then the largest $m=\min_{1\leqslant i\leqslant r}\{m_i\cdot p_i^{\alpha_i}\}$, since it is the largest value such that for all $1\leqslant i\leqslant r$, there exist $m\leqslant u\leqslant n$ such that $p_i^{\alpha_i}|u$.
