<s>[INST] 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
 [/INST] 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.
</s>