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.
 A: Hint $\ $ One of $\,\ n,\,\ n\!-\!3\,$ is even so $\ n(n\!-\!3)-1\,$ is odd, so coprime to $\,2.$
Alternatively $\,2\nmid f(n)=n^2-3n-1\,$ since $f$ has no roots mod $\,2\!:\ f(0)\equiv 1\equiv f(1),\,$ which is a special case of the Parity Root Test.
A: Hint: See what happens when n is even, and what happens when n is odd. :-)
A: $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.$$
A: Hint:
$$
n^2 \equiv n \pmod 2 \implies n^2 - 3n - 1 \equiv n - 3n - 1 = -2n -1 \equiv 1 \pmod{2}
$$
