4, 5, and 7 are mutually coprime, so you can use the Chinese remainder theorem right away.
We construct a number
such that taking it mod 4, 5, and 7 leaves the desired remainders:
![x=3\cdot5\cdot7+4\cdot2\cdot7+4\cdot5\cdot6](https://img.qammunity.org/2020/formulas/mathematics/high-school/yzwr852987usdr38a6ern4ry76j11qhrv0.png)
- Taken mod 4, the last two terms vanish and we have
![x\equiv3\cdot5\cdot7\equiv105\equiv1\pmod4](https://img.qammunity.org/2020/formulas/mathematics/high-school/kka2oj3enhzxhpw8xs3ljtc7r2ne9gcqec.png)
so we multiply the first term by 3.
- Taken mod 5, the first and last terms vanish and we have
![x\equiv4\cdot2\cdot7\equiv51\equiv1\pmod5](https://img.qammunity.org/2020/formulas/mathematics/high-school/8p0yxht22wfh3d3uterua6qpvs2p6iv3jw.png)
so we multiply the second term by 2.
- Taken mod 7, the first two terms vanish and we have
![x\equiv4\cdot5\cdot6\equiv120\equiv1\pmod7](https://img.qammunity.org/2020/formulas/mathematics/high-school/ihlq6qr42uz60d9hdi2jykic2zizw9vf8i.png)
so we multiply the last term by 7.
Now,
![x=3^2\cdot5\cdot7+4\cdot2^2\cdot7+4\cdot5\cdot6^2=1147](https://img.qammunity.org/2020/formulas/mathematics/high-school/td8y4i3wcaajuximkonc324m3tk5539sba.png)
By the CRT, the system of congruences has a general solution
![n\equiv1147\pmod{4\cdot5\cdot7}\implies\boxed{n\equiv27\pmod{140}}](https://img.qammunity.org/2020/formulas/mathematics/high-school/hbmour0u65erbetkyyteixxyfidnjhp68f.png)
or all integers
,
, the least (and positive) of which is 27.