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
 A: I'm assuming you want the value to be divisible by 13.
Since the values mod 13 (remainder when divided by 13) repeat every 13, we just need to test 1, 2, 3, 4, 5, 6, 7, 8, 9, ..., 13. 
1: 1 + 1 + 7 = 9
2: 4 + 2 + 7 = 13 works
3: 9 + 3 + 7 = 19
4: 16 + 4 + 7 = 27
5: 25 + 5 + 7 = 37
6: 36 + 6 + 7 = 49
7: 49 + 7 + 7 = 63
8: 64 + 8 + 7 = 79
9: 81 + 9 + 7 = 97
10: 100 + 10 + 7 = 117 works
11: 121 + 11 + 7 = 139
12: 144 + 12 + 7 = 163
13: 169 + 13 + 7 = 189
So, the values that work should be:
2, 15, 28, 41, 54, etc.
and 10, 23, 36, 49, 62, etc. 
Alternate solution:
$n^2+n+7$ in mod 13 is just $n^2+n-6$. This factors as $(n+3)(n-2)$, and then $n+3$ or $n-2$ is a multiple of 13, giving 10 and 2. We can continue as above.
A: 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\}$
A: $$n^2+n+7 \equiv 0 \pmod {13}$$ which implies $$n(n+1)\equiv 6\pmod {13}$$
which by $$6=2(3)=(-3)(-2)$$
gives $$n\equiv -3,2\pmod {13}$$
which has fully positive form of $$n\equiv 2,10\pmod{13}$$
A: you see that , $13|n^2+n+7\implies13|(n+3)(n-2)+13$, that means $13|n+3\implies n\equiv 10 \pmod {13}$, or, $13|(n-2)\implies n\equiv 2\pmod {13}$.
