0

The question is to find the largest value of prime $p \leq n$, dividing $n! $

Attempt: Let $$ n! =1. 2. 3. 4......... p. 2p.... p^2... p^3.... n$$ It can be easily seen that these are $\lfloor n/p \rfloor$ terms which are divisible by $p$ and $\lfloor n/p^2 \rfloor$ terms which are divisible by $p^2$ and so on. But I don't understand that the highest power of $p$ that divides $n! $ is given by $$\sum_{k=1}^j \lfloor \frac{n}{p^k} \rfloor$$ where $k$ is the largest power of $p$ that is less than or equal to $n$. Any help is appreciated . Thanks

Navin
  • 2,605
  • See https://en.wikipedia.org/wiki/Legendre%27s_formula – lhf Apr 20 '17 at 02:05
  • You may have meant to say $j$, not $k$, is the largest power of $p$ etc. In fact you may as well sum from $k=1$ to $\infty$, since $\lfloor n/p^k\rfloor=0$ once $p^k\gt n$. – Barry Cipra Apr 20 '17 at 02:50

0 Answers0