find the the greatest value of $m$ such that $\text{lcm}(1,2,3,..,n)=\text{lcm}(m,m+1,..,n).$

145 Views Asked by At

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$.

3

There are 3 best solutions below

3
On

Let $L_n$ be the left-hand side, and let $R_{m,n}$ be the right-hand side. Note that $L_n$ is divisible by all of the greatest prime powers $p^r \leq n$. In fact, $$L_n= \prod_{p \leq n} p^r$$ where $p$ is prime and $r$ is the greatest exponent such that $p^r \leq n$.

Clearly $R_{m,n} \mid L_n$. Therefore, $$L_n=R_{m,n} \iff p^r \mid R_{m,n}$$ for each prime $p \leq n$ and greatest $r$.

Set $m_p=\max\{kp^r|1 \leq k \leq n/p^r\}$. Then $m_p \leq n$ is the largest value divisible by $p^r$. Finally, we know $$m=\min\{m_p | p \leq n\}$$

0
On

You clearly need to have the range $[m,n]$ include all primes $p_i>n/2$, since those will not occur as $2p_i$ in the modified range. Similarly you will need any highest prime power that occurs between $n/2$ and the least $p_i$. All other numbers in this interval that are not primes or prime powers will be disposable due to their occurrence in other combinations at higher values.

The governing consideration is whether there is ever an interval without primes or prime power sufficiently large to allow another number to determine the value of $m$. This is answered in the negative by various results of prime gap theorems.

0
On

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$.