I've tried many different things to get a factor of $k-2$ but keep failing.
If $x\equiv2\pmod{3}$ prove that $3 \mid 4x^2+2x+1$
I've tried many different things to get a factor of $k-2$ but keep failing.
If $x\equiv2\pmod{3}$ prove that $3 \mid 4x^2+2x+1$
Hint $\ {\rm mod}\ 3\!:\ x\equiv 2\equiv -1\,\Rightarrow\, 1+2x+4x^2\equiv 1-2+4\equiv 3\equiv 0.\,$
Generally for polynomial $\ p(x),\,\ \ p(-1) = p_0-p_1+p_2-p_3+\cdots = $ alternating coef sum.
Alternatively $\,\color{#c00}{4\equiv1}\,\Rightarrow\, \color{#c00}{4x^2}\!+2x+1\equiv \color{#c00}{x^2}\!+2x+1\equiv (x\!+\!1)^2\,$ which has root $\,x\equiv-1\equiv 2.$
There are also many other ways to proceed, and all provide good exercise in modular arithmetic.
Simply $$4x^2+2x+1\equiv 4\times2^2+2\times2+1=21\equiv0\mod3$$
So let's track each term in $4x^2 + 2x + 1$.
Since $x \equiv 2 \pmod{3}$, we get the following:
$$ 4x^2 \equiv 16\equiv 1 \pmod 3$$ $$2x \equiv 4 \equiv 1 \pmod 3$$ $$1 \equiv 1 \pmod 3$$
Adding these together, we get:
$$4x^2 + 2x + 1 \equiv 0 \pmod 3$$
We conclude that $3\mid (4x^2+2x+1)$.
Another way to prove it:
Since $x \equiv 2 \mod 3$, $\exists k \in \mathbb{Z}$ such that $x=2+3k$. Therefore:
$$4x^2+2x+1=4(2+3k)^2+2(2+3k)+1=21+54 k+36 k^2 = 3(12k^2+18k+7)$$
So clearly $3 \mid (4x^2+2x+1)$.