PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Revision difference : factorial modulo prime powers
Version current Version 2
For $n \in \mathbb{N}$ and any prime number $p$, $\pfac{n}$ is the product of numbers $1 \le m \le n$, where $p \not\vert m$. \newcommand{\pfac}[1]{\left(#1!\right)_p}
For $n \in \mathbb{N}$ and prime number $p$, $\pfac{n}$ is the product of numbers $1 \le m \le n \vert p \not\vert m$.
For natural numbers $n, s$ and a given prime number $p$, we have the congruence For $n, s \in \mathbb{N}$ and prime number $p$, we have the congruence
\begin{displaymath} \frac{n!}{p^{\sum\limits_{i=0}^d \left\lfloor \begin{displaymath} \frac{n!}{p^{\sum_{i=0}^d \left\lfloor
\frac{n}{p^i}\right\rfloor}} \equiv\prod\limits_{i=0}^d\left((\pm \frac{n}{p^i}\right\rfloor}} \equiv\prod\limits_{i=0}^d\left((\pm
1)^{\left\lfloor\frac{n}{p^s+i}\right\rfloor} \pfac{N_i}\right) \pmod{p^s}, 1)^{\left\lfloor\frac{n}{p^s+i}\right\rfloor} \pfac{N_i}\right) \pmod{p^s},
\end{displaymath} \end{displaymath}
where $N_i$ is the least non-negative residue of $\left\lfloor \frac{n}{p^i}\right\rfloor where $N_i$ is the least non-negative residue of $\left\lfloor \frac{n}{p^i}\right\rfloor
\pmod{p^s}$. Here $d+1$ denotes the number of digits in the representation \pmod{p^s}$. $d+1$ denotes the number of digits in the $p$-adic representation
of $n$ in base $p$. More precisely, $\pm 1$ is $-1$ unless $p=2, s \ge 3$. of $n$. More preciesly, $\pm 1$ is $-1$ unless $p=2, s \ge 3$.
\textbf{Proof:} Let $i \ge 0$. Then the set of numbers between 1 and
\begin{proof}
Let $i \ge 0$. Then the set of numbers between 1 and
$\left\lfloor \frac{n}{p^i}\right\rfloor$ is $\left\lfloor \frac{n}{p^i}\right\rfloor$ is
\[\left\{kp, k \ge 1, k \le \left\lfloor\frac{n}{p^{i+1}}\right\rfloor\right\}.\] \[\left\{kp, k \ge 1, k \le \left\lfloor\frac{n}{p^{i+1}}\right\rfloor\right\}.\]
This is true for every integer $i$ with $p^{i+1} \le n$. So we have This is true for every integer $i$ with $p^{i+1} \le n$. So we have
\begin{equation} \begin{equation}
\label{F1} \label{F1}
\frac{\left\lfloor \frac{n}{p^i}\right\rfloor!}{\left\lfloor \frac{n}{p^{i+1}}\right\rfloor \frac{\left\lfloor \frac{n}{p^i}\right\rfloor!}{\left\lfloor \frac{n}{p^{i+1}}\right\rfloor
p^{\left\lfloor\frac{n}{p^{i+1}}\right\rfloor}} p^{\left\lfloor\frac{n}{p^{i+1}}\right\rfloor}}
=\pfac{\left\lfloor\frac{n}{p^i}\right\rfloor}. =\pfac{\left\lfloor\frac{n}{p^i}\right\rfloor}.
\end{equation} \end{equation}
Multiplying all terms with $0 \le i \le d$, where $d$ is the largest power of Multiplying all terms with $0 \le i \le d$, where $d$ is the largest power of
$p$ not greater than $n$, the statement follows from the generalization of $p$ not greater than $n$, the statement follows from the generalization of
Anton's congruence. Anton's congruence.
\end{proof}