MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

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

Hello, Im looking at primes of the form $x^2+ny^2$ for $n>1$ where we can swap $x$ and $y$ and get another prime, I have found many such pairs for many values of n, and i wanted to know if there are any known results about these prime pairs and also if it is known whether there are infinitely many of these pairs (which seems to be the case), or if this follows from a known conjecture.

Now if i call $q$ a 'friend' of $p$ if $p=x^2+ny^2$ and $q=y^2+nx^2$ (with $x,y,n$ the same) and they are both primes, then i also found 'friends' for $p$ with different values of $n$

i.e I can also write $p=w^2+dz^2$ and $q'=z^2+dw^2$ and q' is again a prime

So for example $61=7^2+3\times2^2$ and $151=2^2+3\times7^2$, so id call 151 a 'friend' of 61 but also i have $61=5^2+4\times3^2$ and $109=3^2+4\times5^2$ so 109 is also a 'friend' of 61, hence 61 has 2 friends, now i know this is a long shot but i bet that there exist primes with arbitrarily large amounts of 'friends', i wanted to know if there are any results or conjectures to do with this. The prime with most friends ive found is 12541 which has a friend for $n=3,4,5,7,9,13,15,20,45,57,69,100,165,220,245$ Thank you

share|cite|improve this question
OP has posted related question to,… – Gerry Myerson Jun 3 '11 at 12:18

Your Answer


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

Browse other questions tagged or ask your own question.