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: $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)$
A: If the remainder when $a$ divided by $7$ is $b$, then $a = 7n+b$ for some integer $n$. 
Hence, $a^2+3a+4 = (7n+b)^2+3(7n+b)+4$ $= 49n^2 + 14nb + b^2 + 21n + 3b + 4$ $= 7(7n^2+2nb+3n) + (b^2+3b+4)$. 
So, the remainder when $a^2+3a+4$ is divided by $7$ will be the same as the remainder when $b^2+3b+4$ is divided by $7$.   
For the specific case when $b = 6$, we get that $a^2+3a+4 = 7(7n^2+12n+3n)+58$ $= 7(7n^2+12n+3n+8)+2$.
  So the remainder when $a^2+3a+4$ is divided by $7$ is $2$.
A: The remainder of $a^2+3a+4$ divided by $7$ is sum of the remainder of each terms, modulo $7$.
So $a^2\equiv 1 \pmod{7}$ since $a=7k+6$ then $a^2=7l+1$; $\quad$
$3a\equiv 4 \pmod{7}$ since $3a=21k+18=21k+14+4$ and clearly $4\equiv 4 \pmod{7}$.
Finally $1+4+4 \equiv 2 \pmod{7}$ then the remainder is $2$.
A: $a^2 + 3a + 4 \equiv a^2 - 4a + 4 \equiv (a-2)^2 \pmod 7$
If $a\equiv b \pmod 7$, then $a^2 + 3a + 4 \equiv (b-2)^2 \pmod 7$
