Find smallest positive integer $n$ such that $n!$ is divisible by $p^k$ ($p =$ positive prime, $k =$ positive integer)

2.1k Views Asked by At

I have to find smallest positive integer $n$ in such way that $n!$ is divisible by $p^k$ ($p$ is always positive prime and $k$ is always positive integer).

$p$ and $k$ are given, $n$ is (obviously not known)

I know about Legendre's (de Polignac's) formula but it is not the same?

Do you have any ideas how to do this ? I tried rearranging Legendres formula but it is not necessary true that biggest power of $p$ that divides $n$ is the same to $p^k$ that divides the smallest $n!$ ? Or is it the same?

For example, if $p = 2$ and $k = 5$, the result is $n = 8$, since $8!$ is the smallest factorial divisible by $2^5$.

Thank you.

EDIT: I don't know if this is thinking in right or wrong direction but: simplifying Legendres formula to $ n = k * (p - 1) $ always comes pretty close:

Example: $p = 31$ $k = 750$ solution $n = 22537$ ; With above formula i get $n = 22500$

Should I be rather modyfing this formula to get it or is it completely different ?

1

There are 1 best solutions below

0
On

A variant of Legendre's formula is that $v_p(n!) = \frac{n - S_p(n)}{p-1}$. So we are seeking for the smallest $n$ such that $$ n - S_p(n) \ge (p-1)k. $$ Thus clearly $n > (p-1) k$. As $S_p(n) \le p \log_p n$, if $n - p \log_p n \ge (p-1)k$ then $p^k \mid n!$. As $\log n$ is small compared to $n$, I think $(p-1)k$ is close enough to the right answer, whose exact value I don't think one can find good ''formula'' with.