[Math] Inverses modulo a prime power

modular arithmetic

My question relates to inverses modulo $p^k$ for prime $p$.

I came across an article that gave a recurrence relation for computing inverses modulo $p^{2^n}$, but it did not make clear how (or even if) they might be combined to produce the inverse modulo an arbitrary power $k$.

The recurrence relation in question is $U_0 = a^{-1}$ mod $p$, then $U_{n+1} = U_n(2 – aU_n)$, which produces $U_n = a^{-1}$ mod $p^{2^n}$.

But how would I calculate $a^{-1}$ mod $p^5$, say?

Best Answer

Hint: If $b$ is the inverse of $a$ modulo $p^8$, then $b$ (if you wish reduced modulo $p^5$) is the inverse of $a$ modulo $p^5$.