remainder of $a^2+3a+4$ divided by 7 
If the remainder of $a$ is divided by $7$ is $6$, find the remainder when $a^2+3a+4$ is divided by 7
(A)$2$ (B)$3$ (C)$4$ (D)$5$ (E)$6$

if $a = 6$, then $6^2 + 3(6) + 4 = 58$, and $a^2+3a+4 \equiv 2 \pmod 7$
if $a = 13$, then $13^2 + 3(13) + 4 = 212$, and $a^2+3a+4 \equiv 2 \pmod 7$
thus, we can say that any number, $a$ that divided by 7 has remainder of 6, the remainder of $a^2 + 3a + 4$ is 2.
is there any other way to calculate it? (Let say it given b as the remainder of a divided by 7, not 6)

$a = 6 \quad(\mathrm{mod} 7)$
$a^2 = 36 = 1 \quad(\mathrm{mod} 7)$
$3a = 18 = 4\quad (\mathrm{mod} 7)$
$a^2 + 3a + 4 = 1 + 4 + 4 = 9 = 2 \quad(\mathrm{mod} 7)$
