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.

Let $f(n)=n^2-n-2023$ and $f_p(n)=f(n)\pmod{p}$
$\begin{array}{c|cc} 
n & 0 & 1\\  \hline 
f_2(n) & 1 & 1\end{array}$ thus $f_2(n)\neq 0$ and $2$ is not a prime factor of $f(n)$
$\begin{array}{c|ccc} 
n & 0 & 1 & 2\\  \hline 
f_3(n) & 2 & 2 & 1\end{array}$ thus $f_3(n)\neq 0$ and $3$ is not a prime factor of $f(n)$
$\begin{array}{c|ccccc} 
n & 0 & 1 & 2 & 3 & 4\\  \hline 
f_5(n) & 2 & 2 & 4 & 3 & 4\end{array}$ thus $f_5(n)\neq 0$ and $5$ is not a prime factor of $f(n)$
And since $f(1)=-2023=-7\times 17^2$ then $p=7$ is the lowest prime dividing $f(n)$ for some $n$.
