\(a^2+a-p=0\)
\(\Rightarrow a^2+a=p\Rightarrow a\left(a+1\right)=p\)
Ta có:
\(a\left(a+1\right)⋮2\Rightarrow p⋮2\Rightarrow p=2\)
\(\Rightarrow a^2+a-2=0\Rightarrow\left(a+2\right)\left(a-1\right)=0\Rightarrow\left[{}\begin{matrix}a=-2\\a=1\end{matrix}\right.\)