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

Let $a,b,x,y$ be strict positive integers. Im intrested in primes $p$ such that $p=a^2+b^2=x^2-xy+y^2$. What is the analogue PNT for these type of primes ? I think these primes are all the primes $p \equiv 1 \pmod{12}$.

share|cite|improve this question
so it's just prime number theorem for the arithmetic progression 1 mod 12? no need to consider the form once you know the congruence. – user58512 Jan 31 '13 at 21:53
up vote 1 down vote accepted

By Fermat's theorem on sums of two squares, $p$ can be written as $a^2+b^2$ iff $p \equiv 1 \pmod 4$ or $p = 2$. By this question, $p$ can be written as $x^2-xy+y^2$ iff $p \equiv 1 \pmod 3$ or $p = 3$. A prime $p$ satisfies both if and only if $p \equiv 1 \pmod {12}$, by the Chinese Remainder Theorem.

share|cite|improve this answer
Also note that by the Prime Number Theorem for arithmetic progressions, the number of these primes less than $x$ is asymptotically $\frac{Li(x)}{\varphi(12)}=\frac{Li(x)}{4}$. – Tib Jan 31 '13 at 22:11
To expand @Tib's comment, there are four residue classes mod 12 which are coprime to 12 (1,5,7,11) and the primes are (ultimately, on average) equally divided between them. – Mark Bennet Jan 31 '13 at 22:20

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.