Do there exist positive integers $x, y, z$ such that $28 x+30 y+31 z=365$ ? What is the largest positive integer $n$ such that the equation $28 x+30 y+31 z=n$ cannot be solved in positive integers $x, y, z$ ?
A glance at a calendar confirms that $x=1, y=4, z=7$ solves the first equation. For the second part, we claim the maximum value of $n$ is 370 . To see that this $n$ cannot be obtained, suppose $28 x+30 y+31 z=370$ and consider remainders modulo 28 to observe that $2 y+3 z \equiv 6(\bmod 28)$. Also, $30(y+z)398$, then (either by the induction hypothesis or by one of the above base cases) we can write $n-28=28 x+30 y+31 z$ for positive integers $x, y, z$; then $n=28(x+1)+30 y+31 z$.