# Simple question about divisibility and modular arithmetic

Is the following true?

Fix an $n\in \Bbb N$ which is not a multiple of $5$. Then for every $l\in\{0,\cdots,n\}$ there exists a $k\in \Bbb N_0$ with $5k\equiv l \mod n$.

If yes, how do we prove it?

If $n$ is not a multiple of $5$, then $\gcd(5, n) = 1$, and there are integers $x, y$ such that $$5x+ny = 1 \implies 5x = 1-ny$$ They are given by, for instance, the extended Euclidean algorithm. We may assume that $x$ is positive. To see that that's true, say $x$ isn't positive. Then $y$ is positive, and $$5(x-nxy) + n(y + 5xy) = 1$$ is another such linear combination where the coefficient of $5$ is larger. Repeating this, we see that the coefficient of $5$ eventually becomes positive. We let that be our chosen $x$.
Let $k = xl$. This gives $$5k = 5xl = l(1-ny) = l-ny \equiv l \mod n$$ which means that this is the $k$ we're looking for.