Find all positive integers $n $ such that $n^2+n+7$ devided by 13. An idea please Find all positive integers  $n $ such that $n^2+n+7$ devided by 13.
An idea please

Since $13$ is a prime number, then $\mathbb Z_{13}$ is a field. Hence the quadratic equation will work.
$$n^2+n+7 \equiv 0 \pmod {13}$$
Note that $2 \cdot 7 \equiv 1 \pmod {13}$. So $\dfrac 12 \equiv 7 \pmod{13}$.
\begin{align}
   n &\equiv \dfrac{-(1) \pm \sqrt{(1)^2-4(1)(7)}}{2(1)} \pmod{13} \\
   n &\equiv 7 \cdot \left(-1 \pm \sqrt{1-28} \right) \pmod{13}  \\
   n &\equiv 7 \cdot \left(-1 \pm \sqrt{-27} \right) \pmod{13}  \\
   n &\equiv 7 \cdot \left(-1 \pm \sqrt{12} \right) \pmod{13}  \\
   n &\equiv 7 \cdot \left(-1 \pm 5 \right) \pmod{13}  
     &\text{(Note $5^2 \equiv 25 \equiv 12 \pmod{13}$.)} \\
   n &\in \{2, 10\}
\end{align}
So $n^2+n+7$ is divisible by $13$ when $n$ is equivalent to $2$ or $10$ modulo $13$.
With some fooling around, you can do this without using the quadratic formula.
$$n^2 + n + 7 \equiv n^2-12n+20 \equiv (n-2)(n-10) \pmod{13}$$
so $n \in \{2,10\}$
or
$$n^2 + n + 7 \equiv n^2+n-6 \equiv (n+3)(n-2) \pmod{13}$$
so $n \in \{2,-3\} \equiv \{2,10\}$
