Finding the smallest positive integer a Can we find the smallest positive integer $a$ such that $1971|50^n+a.23^n$ where n is odd?
Source:Problem Solving Strategies by Arthur Engel

Since $50^2\equiv23^2\equiv529\pmod{1971}$ and $(529,1971)=1$, we have
$$
\begin{align}
50^{2n+1}+a\cdot23^{2n+1}&\equiv0\pmod{1971}\\
50\cdot529^n+a\cdot23\cdot529^n&\equiv0\pmod{1971}\\
50+a\cdot23&\equiv0\pmod{1971}
\end{align}
$$
Using the Euclid-Wallis Algorithm
$$
\begin{array}{r}
&&85&1&2&3&2\\\hline
1&0&1&-1&3&-10&23\\
0&1&-85&86&-257&857&-1971\\
1971&23&16&7&2&1&0\\
\end{array}
$$
we get that $857\cdot23\equiv1\pmod{1971}$. Therefore,
$$
a\equiv-50\cdot857\equiv512\pmod{1971}
$$
