Given that \(13^{-1} \equiv 29 \pmod{47}\), find \(34^{-1} \pmod{47}\), as a residue modulo 47. (Give a number between 0 and 46, inclusive.)
\(13^{-1}\equiv 29 \pmod{47}\\ (29)(13) \equiv 1 \pmod{47}\\ (29)(47-34)\equiv 1 \pmod{47}\\ (29)(47)+(-29)(34)\equiv 1 \pmod{47}\\ -(29)(34) \equiv 1 \pmod{47}\)
\(34^{-1} \equiv (-29) \pmod{47}\\ (-29)\equiv (47-29) \pmod{47}\\ (-29)\equiv 18 \pmod{47}\\ 34^{-1} = 18 \pmod{47}\)
\(\text{as a check}\\ 18\cdot 34 = 612 = 13\cdot 47 + 1\\ 18 \cdot 34 \equiv 1 \pmod{47}\)
.\(13^{-1}\equiv 29 \pmod{47}\\ (29)(13) \equiv 1 \pmod{47}\\ (29)(47-34)\equiv 1 \pmod{47}\\ (29)(47)+(-29)(34)\equiv 1 \pmod{47}\\ -(29)(34) \equiv 1 \pmod{47}\)
\(34^{-1} \equiv (-29) \pmod{47}\\ (-29)\equiv (47-29) \pmod{47}\\ (-29)\equiv 18 \pmod{47}\\ 34^{-1} = 18 \pmod{47}\)
\(\text{as a check}\\ 18\cdot 34 = 612 = 13\cdot 47 + 1\\ 18 \cdot 34 \equiv 1 \pmod{47}\)