Problem
NT-B2-M02-P003 Divisibility by Seven
#3
★★☆☆☆ Level 2 of 5
Find all \(n\) such that \(7\mid n^2+n+1\).
Check the seven residues of \(n\pmod7\).
For \(n\equiv0,1,2,3,4,5,6\pmod7\), the expression \(n^2+n+1\) gives residues \(1,3,0,6,0,3,1\). Thus divisibility by \(7\) holds exactly when \(n\equiv2\) or \(n\equiv4\pmod7\).
One may later show a discriminant approach, but the table is faster here.