Find the greatest common divisor (gcd) of $n^2 - 3n - 1$ and $2$ Find the greatest common divisor (gcd) of $n^2 - 3n - 1$ and $2$ considering that $n$ is an integer. Thanks.

$2$ only has two divisors, 0 and 1. So $gcd(a,2)=1$ or $2, \forall a \in \mathbb{Z}$.
Case 1: $n$ is even. Then $n^2 \equiv 0 \pmod{2}, 3n\equiv 0 \pmod{2}.$ So then $gcd(n^2-3n-1,2)=1$ because $n^2-3n-1 \equiv 0+0-1 \equiv 1 \pmod{2}$.
Case 2: $n$ is odd. Then $n^2 \equiv 1 \pmod{2}, 3n \equiv 1 \pmod{2}.$ So then $gcd(n^2-3n-1,2)=1$ again because $n^2-3n-1 \equiv 1+1-1 \equiv 1 \pmod{2}$.
$$\therefore \forall n \in \mathbb{Z}, gcd(n^2-3n-1,2)=1.$$
Alternatively, by Fermat's Little Theorem, $a^2 \equiv a \pmod{2},$ so$$ n^2-3n-1 \equiv n-3n-1 \equiv -2n-1 \equiv 1 \pmod{2} \implies gcd(n^2-3n-1,2)=1.$$
