Problem
NT-B1-M03-P008 Divisibility of \(n^2+n+1\) by 7
#8
★★☆☆☆ Level 2 of 5
Find all integers \(n\) for which \(7\mid n^2+n+1\).
Check \(n=0,1,\ldots,6\) modulo \(7\).
The values of \(n^2+n+1\) modulo \(7\) for \(n=0,1,2,3,4,5,6\) are \(1,3,0,6,0,3,1\). Therefore \(n\equiv2\) or \(n\equiv4\pmod7\).
This is not a linear congruence, so a full table is acceptable.