Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is an example of positive integer that cannot be written as $p+a^2$, with $p$ prime or 1 and $a \geq 0$?

This should be simple, but every example I've come up with so far seems to satisfy the conjecture. Maybe there's a systematic way of finding counterexamples I'm not aware of?

share|cite|improve this question
Note also Hardy & Littlewood's Conjecture H, which implies that there are only finitely many counterexamples other than squares and squares plus one. (There are probably only finitely many counterexamples that are squares plus one as well, but H-L didn't comment on that form.) – Charles Nov 5 '11 at 17:55
up vote 5 down vote accepted

Simply checking every positive integer in order quickly reveals that $25$ is a counterexample.

share|cite|improve this answer
Extending this observation: try your luck with squares! $n^2-a^2$ with $a<n$ can be a prime only, if $a=n-1$, so... $64$ is another counterexample. – Jyrki Lahtonen Nov 5 '11 at 17:48
Related:, which are counterexamples unless they are one more than a square. – Charles Nov 5 '11 at 17:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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