Find the natural integers $n$ such that the fraction

$$
\frac{21 n+4}{14 n+1}
$$

is irreducible.

The second theorem is due to Carl Friedrich Gauss.

Theorem 2.2.18 (Gauss's Theorem).

Let $a, b$, and $c$ be three natural integers such that $a$ divides $b \times c$. If $a$ and $b$ are coprime, then $a$ divides $c$.

Proof. Since $a \wedge b=1$, Bézout's theorem indicates that there exist two integers $m$ and $n$ such that $a \times m+b \times n=1$. Let $k$ be an integer such that $b \times c=a \times k$. It then appears that

$$
c=c \times(a \times m+b \times n)=a \times c \times m+b \times c \times n=a \times c \times m+a \times k \times n
$$

is indeed a multiple of $a$.
This time, the method used in the previous exercise does not work exactly as expected. Indeed, one cannot do much better than the equality

$$
2 \times(21 n+4)-3 \times(14 n+1)=(2 \times 21-3 \times 14) \times n+(2 \times 4-3 \times 1)=5 \text{. }
$$

Let $d$ be the integer $(21 n+4) \wedge(14 n+1)$: we have just shown that $d$ necessarily divides 5. This means that $d$ is either 1 or 5.

Now let $r$ be the remainder of the Euclidean division of $n$ by 5. It is easily verified, by considering each of the 5 possible values of $r$, that $14 r+1 \equiv 0(\bmod 5)$ if and only if $r=1$. Since $14 n+1 \equiv 14 r+1(\bmod 5)$, this means that $14 n+1$ is divisible by 5 if and only if $n \equiv 1(\bmod 5)$. But then, in this case, we also have $21 n+4 \equiv 21+4 \equiv 0$ $(\bmod 5)$, so that $d=5$.

In conclusion, we have $d=5$ if $n \equiv 1(\bmod 5)$, and $d=1$ otherwise. In particular, the integers $n$ sought are exactly the integers $n$ such that $n \not \equiv 1(\bmod 5)$.