Is it true that $n!$ divides $p^n(p+1)(p^2+p+1)\cdots(p^{n-1}+\cdots+1)$?

Original version:

This is not true for $n=2p$. The numerator has only one factor that is a multiple of $p$, but the denominator is divisible by $p^2$.


Edited version:

This can be seen as follows. Let $q$ be a prime $\le n$. It is well known that the highest power $q^\ell$ that is a factor of $n!$ has exponent $$ \ell=\lfloor \frac nq\rfloor+\lfloor\frac n{q^2}\rfloor+\cdots $$ (this is a finite sum as the terms become zero after $q^k$ exceeds $n$). This is because $n!$ has $\lfloor\dfrac n q\rfloor$ factors that are divisible by $q$, $\lfloor\dfrac n {q^2}\rfloor$ factors that are (additionally) divisible by $q^2$ et cetera. We need to show that the numerator is divisible by $q^\ell$ as well.

If $q=p$ the first factor takes care of everything because $n\ge\ell$.

Otherwise, let $t$ be the order of $p$ modulo $q$, i.e. $t$ is the smallest positive integer such that $p^t\equiv1\pmod q$. It is known (Little Fermat) that $t\mid q-1$. Another standard exercise shows that $$ p^{tq^m}\equiv 1\pmod {q^{m+1}} $$ for all integers $m\geq0$.

Now we are well places to study an individual factor $$ x(r)=1+p+p^2+\cdots+p^{r-1}=\frac{p^r-1}{p-1}. $$

Assume next that $p\not\equiv1\pmod q$. It follows that $x(r)$ is divisible by the same power of $q$ as $p^r-1$. So $x(r)$ is divisible by $q$ whenever $r$ is a multiple of $q-1$, divisible by $q^2$ whenever $r$ is a multiple of $q(q-1)$ et cetera. It follows immediately that $\prod_{r=1}^n x(r)$ is divisible by $q^\ell$.

This leaves the case of $q\mid p-1$. In this case $p^k\equiv 1\pmod q$ for all $k$, so $x(r)\equiv r\pmod q$. In particular, $x(r)$ is divisible by $q$ whenever $q\mid r$. However, we need a little bit more to get some of the factors $x(r)$ divisible by higher powers of $q$ as well. A way forward is to observe that if $p\equiv1\pmod{q^k}$ for some $k\ge0$, then, for all $i$ we have that $$p^{q^i}\equiv1\pmod {q^{k+i}}$$ for all $i\ge0$. This forces $x(r)$ to be divisible by $q^i$ whenever $r$ is. This settles the last case.


No.

Take $p=5$. Then of the polynomials $p$, $p+1$, $p^2+p+1$, $\ldots$ only the polynomial $p$ is divisible by 5.

Yet $n!$ is divisible by $5^{\lfloor\frac{n}{5} \rfloor}$.

[In fact the above argument holds for any $p$ and $n$ large enough relative to $p$; indeed $n!$ is divisble by $p^{\lfloor\frac{n}{p} \rfloor}$]


Let $q$ be a prime $\le n$. Then the maximal exponent $k$ such that $q^k$ divides $n$ is $$k=\lfloor n/q\rfloor +\lfloor n/q^2\rfloor+\lfloor n/q^3\rfloor+\ldots,$$ and this exponent is strictly less than $n/q+n/q^2+\ldots=\frac n{q-1}$, and in particular $k<n$.

If $p=q$, we see immediately that $q^k$ cancels against $p^n$.

For other $p$, let $s$ be minimal with $p\not\equiv 1\pmod {q^r}$. Then for $1\le \ell<s$, we have that $1+\ldots + p^{r-1}$ is a multiple of $q^\ell$ iff $\ell \mid r$, hence for $\lfloor n/q^\ell\rfloor$ of the factors. Moreover, we have that $1+p+\ldots + p^{r-1}=\frac{p^r-1}{p-1}\equiv0\pmod {q^s}$ whenever $r$ is a multipe of $\phi(q^s)=q^{s-1}(q-1)$, which happens for $\lfloor \frac n{q^{s-1}(q-1)}\rfloor$ of the factors. We conclude that the numerator contains $q$ to the power of $$ \sum_{\ell=1}^{s-1}\left\lfloor \frac n{q^\ell}\right\rfloor +\left\lfloor \frac n{q^{s-1}(q-1)}\right\rfloor.$$ In order to show that this is $\ge k$, it suffices to show $$ \sum_{\ell=s}^{\infty}\left\lfloor \frac n{q^\ell}\right\rfloor \le \left\lfloor \frac n{q^{s-1}(q-1)}\right\rfloor$$ But the left hand side is $<\sum_{\ell=s}^{\infty}\frac n{q^\ell}= \frac n{q^{s-1}(q-1)}$, and as it is an integer, the claim follows. Hence $q^k$ cancels against the numerator.

In summary, it follows that $n!$ cancles against the numberator.