Find all $a,b\in \{0,1,2,\ldots\}$ such that \begin{align} a+4b\equiv 0 \pmod{5} \\ a+b\equiv 1 \pmod{2} \end{align}
I've found that e.g. $a = 5, 15, 25,\ldots$ and $b=0$ works, but I'm unsure how to find all of them.
Find all $a,b\in \{0,1,2,\ldots\}$ such that \begin{align} a+4b\equiv 0 \pmod{5} \\ a+b\equiv 1 \pmod{2} \end{align}
I've found that e.g. $a = 5, 15, 25,\ldots$ and $b=0$ works, but I'm unsure how to find all of them.
We have
$$a+4b\equiv 0\pmod 5\iff a-b\equiv 0\pmod 5$$
$$a+b\equiv 1\pmod 2\iff a-b\equiv 1\pmod 2$$
So, we have $$a-b=5\times (\text{odd number})$$
So, all solutions are of the form $$(a,b)=(5(2k+1)+m,m)$$ where $m,k$ are integers such that $$5(2k+1)+m\ge 0\qquad\text{and}\qquad m\ge 0$$
Let's apply CRT, denoting $\,x:=a\,$ and generalizing $\,5\mapsto \color{#0a0}{n\ \rm odd}$
So we're solving $\ \ \begin{align}x&\equiv b\ \ \ \ \:\!\pmod{\!n}\ \ \ \ \,{\rm [note}\,\ x:= a\equiv\, -4b\,\equiv\ b\ \:\! \pmod{\!n\!=\!5}\\ x&\equiv b\!+\!\color{#0a0}1\!\!\pmod{\!2}\ \ \ \ \ {\rm [note}\,\ x:=a\equiv 1\!-\!b\equiv b\!+\!1\!\!\!\pmod{\!n\!=\!2}\end{align}$
Therefore, since: $\ x\equiv b\!+\!\color{#0a0}n\,\pmod{\!n}\, $ & $\!\!\pmod{\!\color{#0a0}{2}},\,$ so $\,\bbox[5px,border:1px solid #c00]{x\equiv b\!+\!n\pmod{\!2n}}\,$ by CCRT & $\color{#0a0}{(2,n)\! =\! 1}$
Or we can rotely apply the standard CRT method:
$\!\!\bmod n\!:\ x \equiv b\!\iff\! x = \color{#0a0}{b\!+\!nj}$
$\!\!\bmod 2\!:\,\ b+1\,\equiv\,x\,\equiv\, \color{#0a0}{b\!+\!n}\,\color{#c00}j\equiv b\!+\!j\!\iff\! j\equiv 1\!\iff\! \color{#c00}{j=1\!+\!2k}$
Thus we conclude: $\,x =\, b\!+\!n(\color{#c00}{1\!+\!2k})= \bbox[5px,border:1px solid #c00]{b\!+\!n+2nk}$