0

I came across this formula while playing with the direct construction for the Chinese remainder theorem:

https://en.wikipedia.org/wiki/Chinese_remainder_theorem#Existence_(direct_construction)

Let $f$ be a function of two coprime positive integers $m$ and $n$ defined in the following way:

$f(m,n) = m*(m^{-1} \mod{n})$,

where $\mod{n}$ is the least residue system modulo $n$:

https://en.wikipedia.org/wiki/Modular_arithmetic#Residue_systems

It looks like the following is true for any positive integer $k$:

$f(m,n^k) = f(m,n)^{n^{k - 1}} \mod{m*n^k}$

I checked it using a Python program on a number of input parameters.

Can we prove it in general?

Is there a better expression for the power $p$ such that $f(m,n^k) = f(m,n)^p \mod{m*n^k}$?

Or maybe there is a better way to express $f(m,n^k) \mod{m*n^k}$ via $f(m,n)$?

Alex C
  • 1,238
  • 2
    They both satisfy $,x\equiv 0\pmod{m},$ and $,x\equiv 1\pmod{n^k},,$ where the latter congruence follows by applying LTE $k$ times to $,f(m,n)\equiv 1\pmod{n}.,$ Thus they are congruent $\bmod mn^k,$ by CRT. $\ \ $ – Bill Dubuque Sep 18 '24 at 01:34

1 Answers1

1

Since $f(m,n)\equiv 1\bmod{n}$, we can write $f(m,n)=1+g(m,n)\cdot n$. In addition, $f(m,n)\equiv 0\bmod{m}$, ie is divisible by $m$. Since $m$ and $n$ are coprime, by the Chinese remainder theorem, this uniquely determines $f(m,n)\bmod{mn}$.

We can expand $f(m,n)^{n^{k-1}}$ using the binomial formula: $$ \begin{align} f(m,n)^{n^{k-1}} =&\left[1+g(m,n)\cdot n\right]^{n^{k-1}}\\ =&1+\binom{n^{k-1}}{1}\cdot g(m,n)\cdot n +\binom{n^{k-1}}{2}\cdot g(m,n)^2\cdot n^2 +\cdots\\ \equiv&1\pmod{n^k} \end{align} $$ since higher order terms $\binom{n^{k-1}}{i}\cdot n^i$ for $i\ge 2$ are all multiples of $n^{k}$: this is true even when $\binom{n^{k-1}}{i}$ is not a multiple of $n^{k-1}$ when factors of $i!$ divide $n$ due to the as the term $n^i$.

So, this makes $f(m,n)^{n^{k-1}}$ a multiple of $m$ as well as $\equiv 1\pmod{n^k}$, which means it must be equivalent to $f(m,n^k)\pmod{n^k}$.

Einar Rødland
  • 11,378
  • 23
  • 39