Intersection points of two functions Find all intersection points (with integer coordinates) of $$y=p$$ and $$y=|x^2+2x-15|$$ if p is prime number.
Now what I tried: 
$$|x^2+2x-15|=p$$
then
$$|(x+1)^2-16|=p$$  
then
$$(x+1)^2=16-p$$ $$or$$ $$(x+1)^2=p+16$$
So $p+16$ and $16-p$ must be square numbers. I found that if $p=7$ $$(x+1)^2=9$$ so $x=2$ or $x=-4$, therefore intersection points, which I found are $(2;7)$ and $(-4;7)$. But how to find other intersection points or prove that there are no others? 

You can instead write $y=x^2 + 2x - 15$ as $$y=(x+5)(x-3).$$ Then, we are searching for integers $x$ such that $$p=|(x+5)(x-3)| = |x+5| \cdot |x-3|$$ where $p$ is a prime. Thus, $$\begin{align}\text{either} \quad &|x+5| = 1 \quad\\ \text{or} \quad &|x-3|=1.\end{align}$$
Now,
$$
\begin{align}
|x+5| = 1 &\Leftrightarrow x = -6 \quad \text{or} \quad x=-4 \\
|x-3| = 1 &\Leftrightarrow x = \phantom{-}2 \quad \text{or} \quad x=\phantom{-}4.
\end{align}
$$
Thus, these are the only possible integer values that $x$ can take. Evaluating $|(x+5)(x-3)|$ at these values, we can check whether or not the value is prime.
$$
\begin{align}
x = -6 &\Rightarrow |(x+5)(x-3)| = 9 \leftarrow \text{NOT prime} \\
x = -4 &\Rightarrow |(x+5)(x-3)| = 7 \leftarrow \text{prime} \\
x = \phantom{-}2 &\Rightarrow |(x+5)(x-3)| = 7 \leftarrow \text{prime} \\
x = \phantom{-}4 &\Rightarrow |(x+5)(x-3)| = 9 \leftarrow \text{NOT prime}
\end{align}
$$
Thus, $(x,p) = (-4,7)$ and $(x,p) = (2,7)$ are the only possible solutions.
