Find the smallest positive integer, whose last $4-digit$ part is $2010$ and is divisible by $2011$.
I solved it in the following way:
I state that $a$ is the number in front of $2010$, in other words if the number we're looking for is $A$, then $A=10^4\cdot a+2010$.
Hence, $a\cdot10^4\equiv1\bmod2011$.
$1956a\equiv1\bmod2011$
$55a\equiv2010\bmod2011$
So $55a=2010+2011k$ for some positive integer $k$.
So $30+31k\equiv 0 \bmod55$
After doing some trial and error for $k\in[0,54]$
$k_{min}=15$
So $55a=32175$, $a=585$.
Hence the smallest number possible is $5850000$
I solved this question using classical number theory and trial-and-error. However, I realize that this question can be solved using the euclidean algorithm. When I looked it up on the internet the only thing I could find was this: https://en.wikipedia.org/wiki/Euclidean_algorithm which is how to find the gcd using euclid's algorithm. Could you please explain to me how to solve the question using the euclidean algorithm, and also please explain to me what the euclidean algorithm is, how it can be applied and some resources to study from?