2
$\begingroup$

Prove that there are infinity numbers that you can't write them in the form of $a^2+p$ where $a$ is a integer and $p$ is a prime.

The book wrote the answer all numbers in the form of $(3k+2)^2$ where $k$ is an integer but I can't show why?

$\endgroup$

2 Answers 2

5
$\begingroup$

Hint: rewrite as $p=(3k+2)^2-a^2$ and note that if $a$ is not divisible by $3$ the difference of squares is, and if $a$ is divisible by $3$ you get a factorisation which shows $p$ cannot be prime.

I've left you a bit of work to do, and even some gaps to fill, because you haven't really explained what you've tried.

Incidentally, with $k=0$ you have $2^2=1^2+3$ which is a counter-example - perhaps $k$ is supposed to be a positive integer? There are still an infinite number of examples to provide an answer to the original question.

$\endgroup$
1
$\begingroup$

Suppose that $(3k+2)^2$ can be written in the form $a^2+p$, then $(3k+2)^2-a^2=p$ and $(3k+2-a)(3k+2+a)=p$. Note that $3k+2 \neq a$. Now, $p=(3k+2-a)(3k+2+a)$ is a composite number unless $p=3k+1$, which gives $p=6k+3$. It is composite again. Contradiction.

$\endgroup$
2
  • 1
    $\begingroup$ You need to exclude $a=3k+1$ too - not difficult, but has to be done. $\endgroup$ May 29, 2017 at 16:18
  • $\begingroup$ Right! Thanks. I'll edit my answer. $\endgroup$
    – Ghartal
    May 29, 2017 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.