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.
The answer is 7.
As 2023 is a multiple of 7, it follows that for any $n$ that is a multiple of 7, so will $n^2-n-2023$ be a multiple of 7. So now it remains to show that $n^2-n-2023$ is not a multiple of 2,3, or 5 for any integer $n$.
However, the prime 5 is not a multiple for any integer $n$: $2023 \equiv 3 \mod 5$ yet there is no $j \in \mathbb{F}_5$ such that $j^2-j = 3$. This implies that there is no $n$ that satisfies $n^2-n \equiv 3 \mod 5$ [make sure you see why] which implies that there is no $n$ s.t. $n^2-n -2023$ is divisible by 5.
Likewise 3 will not be a multiple for any integer $n$; $2023 \equiv 1 \mod 3$ yet there is no $j \in \mathbb{F}_3 $ such that $j^2-j = 1$. This implies that there is no $n$ s.t. $n^2-n -2023$ is divisible by 3 [make sure you see why].
Meanwhile you can check that $n^2-n-2023$ is always odd for each integer $n$; if $n$ is even it is the sum of two evens and 1 odd, if $n$ is odd it is the sum of 3 odds. This implies that there is no $n$ s.t. $n^2-n -2023$ is divisible by 2.