Problem
NT-B1-M03-P016 Divisibility by 13
#16
★★★☆☆ Level 3 of 5
Find all integers \(n\) for which \(13\mid n^2+n+1\).
Check residues \(0,1,\ldots,12\), or use the symmetry between \(n\) and \(-1-n\).
Checking residues modulo \(13\) gives zeros only for \(n\equiv3\) and \(n\equiv9\). Indeed, \(3^2+3+1=13\), \(9^2+9+1=91=7\cdot13\). Other residues give nonzero values. The answer is \(n\equiv3\) or \(9\pmod{13}\).
A slightly longer table; good for training accuracy.