Help on residue: $3^x + 22^y \equiv 15^z \equiv 15 \pmod{40} $ I am reading this note (click here and go to page 1994 for detail, in the proof of lemma 8), and found-
$$3^x + 22^y \equiv 15^z \equiv 15 \pmod{40} $$
now, I can derive $3^x + 22^y \equiv 15^z \ \pmod{40} $ but I cann't figure out how $3^x + 22^y \equiv 15^z\pmod{40}$ is $ \equiv 15 \pmod{40}$.
How to prove that the congruence has residue 15?

If the assumptions of your prior question hold here, then we know that $z$ is odd.
But for odd $z$, $15^z\equiv z \pmod {40}$.
To see this,  We note that $15^2=225\equiv 25\pmod {40}$ and $$15^3\equiv 15\times 25\equiv 15\pmod {40}$$  Then $$15^4=15^3\times 15\equiv 15^2\equiv 25 \pmod {40}$$ and  $$15^5\equiv 15^4\times 15\equiv 25\times 15\equiv 15 \pmod {40}$$   and so on.
By induction, we deduce that $15^{2n}\equiv 25\pmod {40}$ and $15^{2n+1}\equiv 15 {\pmod {40}}$.
