<s>[INST] Find the smallest prime number $p$ such that $p\, | \,n^2-n-2023$ for some integer $n$. Find the smallest prime number $p$ such that $p\, | \,n^2-n-2023$ for some integer $n$.
since $n^2-n =n(n-1)$ is the product of two consecutive integers they must be even so the difference between an even and odd number is always odd so $n^2-n-2023$ is always odd which implies $p$ is not even and the only even prime is $2$ so $p\neq 2$  but after this I do not know what to do please help.
 [/INST] $n^2-n-2023$ is odd, so for prime $p$ we have, modulo $p,$ that  $n^2-n-2023\equiv 0\iff 4n^2-4n-8092\equiv 0\iff (2n-1)^2\equiv 8093.$
Now $8093\equiv 2 \mod 3,$ and $2$ is not  the residue$\mod 3$ of a square, so $p\ne 3.$
And $8093\equiv 3 \mod 5,$ and $3$ is not the residue$\mod 5$ of a square, so $p\ne 5.$
Since $8093\equiv 1\equiv 1^2 \mod 7,$ we have  $n=1\implies (2n-1)^2= 1\equiv 8093 \mod 7\implies  n^2-n-2023\equiv 0\mod 7.$
</s>