# Positive integer $m≤n$ such that $m$ has the largest number of distinct prime factors among all positive integers $\le n$

How do I interpret the following mathematically:

Consider a positive integer $$n$$ such that $$n=p_1^{\alpha_1}p_2^{\alpha_2}\cdots p_m^{\alpha_m}$$ where $$p_i$$ are primes and $$\alpha_i$$ are positive integers.

I want to consider the positive integer $$m\le n$$ such that $$m$$ has the largest number of distinct prime factors among all positive integers less than or equal to $$n$$.

I explain it with the following example:

Consider $$n=36$$. Here my $$m$$ will be $$30$$ since $$30=2\times 3\times 5$$ and it has the largest number of distinct prime factors among all positive integers which are less than or equal to $$n=36$$.

But I cant express my view mathematically. How do I present my mathematical idea? Can someone please help me to write the above fact in a more precise and concise manner which can be easily understood by mathematicians.

• math.stackexchange.com/questions/409675/… Jun 30, 2020 at 6:58
• @DhanviSreenivasan; I never asked in my question to find the number of prime factors of an integer, i needed help with writing my concept Jun 30, 2020 at 10:15

Find the largest positive integer $$\ k\$$ with $$\ p_k$$#$$\le n\$$
Then, there is a number not exceeding $$\ n\$$ , namely $$\ p_k$$# , with $$\ k\$$ distinct prime factors and a number with $$\ k+1\$$ or more distinct prime factors must be at least $$\ p_{k+1}$$#$$>n\$$
Hence , the desired number is $$\ m=p_k$$# , in other words, the largest primorial not exceeding $$\ n\$$.
• What is meant by #? Jun 30, 2020 at 10:08
• $p$# stands for $\ 2\cdot 3\cdot 5\cdots p\$.(called "primorial") Jun 30, 2020 at 10:08
• It is easy to show that the primorial with the primes upto the $\ k\$-th prime is the smallest positive integer with at least $\ k\$ distinct prime factors. Jun 30, 2020 at 10:10
• What does primorial mean? I am sorry but is it possible to give a more detailed answer Jun 30, 2020 at 10:13