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)$?