The questions
Determine the prime natural numbers $p$ for which there exists $x \in Z$ such that $p | x^2+2x+1$ and $p | x^2+8x+16$.
my idea
We know that
$x^2+2x+1=(x+1)^2$
$x^2+8x+16=(x+4)^2$
which means
$$p | (x+1)^2$$
and
$$p | (x+4)^2$$
because p is prime it means that
$p | (x+1)$ and $p | (x+4)$
if we decfrease them we get that $p|3$ and because p is natural we get that p can only be 3
I'm not sure about the part where i said that because p is prime it means that
$p | (x+1)$ and $p | (x+4)$
I feel like i should explain more, but i dont know how to. Hope one of you can tell me if my rationament is good and how should i improve the answer. Thank you!
Your analysis is both accurate and valid.
If $~p~|~n^2,~$ then $~p~$ occurs in the prime factorization of $~n^2.~$
Since the prime factorization of $~n~$ is identical to the prime factorization of $~n^2,~$ except that the exponents are different, $~p~$ must also occur in the prime factorization of $~n.~$
This implies that $~p ~| ~n.$