We want to find
such that
![\begin{cases}y\equiv3\pmod5\\y\equiv3\pmod6\\y\equiv3\pmod9\end{cases}](https://img.qammunity.org/2020/formulas/mathematics/middle-school/xyx37c9g6dawhfd434s7mwuilpt3ab8pgp.png)
6 and 9 are not coprime, so we split the moduli according to
and
to get the system
![\begin{cases}y\equiv3\equiv1\pmod2\\y\equiv3\equiv0\pmod3\\y\equiv3\pmod5\end{cases}](https://img.qammunity.org/2020/formulas/mathematics/middle-school/d0h7b08wrncpa0oi9kiywwlkwfknzif6el.png)
If we take
![y=1\cdot3\cdot5+0\cdot2\cdot5+3\cdot2\cdot3](https://img.qammunity.org/2020/formulas/mathematics/middle-school/zbw15672yhv6xnjiqrpzx93zov4lx2t7sa.png)
we can see that
- taken mod 2, the last two terms vanish and we're left with
; - taken mod 3, the first and last terms vanish, and the remaining term is
; - taken mod 5, the first two terms vanish, and we're left with
![18\equiv3\pmod5](https://img.qammunity.org/2020/formulas/mathematics/middle-school/1pctsmtdgk8o1r23oigrjngezr4xpwhkb3.png)
By the Chinese remainder theorem, we've found that any
satisfying
![y\equiv15+0+18\equiv33\pmod{2\cdot3\cdot5}\equiv3\pmod30](https://img.qammunity.org/2020/formulas/mathematics/middle-school/4j2y5k9rgfxd0u6i0ka3fcxkn12g894osm.png)
will satisfy each congruence above, and that any solution of the form
for any integer
will work.
The smallest possible value of these occurs for
, so that 3 is the least positive solution.