Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. 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

For some fixed $n$ define the quadratic form $$Q(x,y) = x^2 + n y^2.$$

I think that if $Q$ represents $m$ in two different ways then $m$ is composite.

I can prove this for $n$ prime. I was hoping someone could give me a hint towards proving this result for general $n$? Also would be interested in generalizations if any are known! Thanks a lot.

share|cite|improve this question
up vote 6 down vote accepted

Below is Lucas' classic proof, from his Theorie des nombres, 1891, as described in section 215 of Mathews: Theory of Numbers. enter image description here enter image description here

share|cite|improve this answer

John Brillhart published a paper about this in the American Mathematical Monthly some time in the past year.

share|cite|improve this answer
I think it's A Note on Euler's Factoring Problem. – lhf Apr 15 '11 at 12:59
Yes, that's the paper I had in mind. – Gerry Myerson Apr 15 '11 at 13:14
I cannot access this but thank you for the comment. – quanta Apr 15 '11 at 14:29
@quanta, that's what libraries are for. Another approach would be to send email to Professor Brillhart. But maybe Bill's answer has given you what you need. – Gerry Myerson Apr 16 '11 at 0:33
@quanta: Brillhart's paper also employs Lucas' proof. – Bill Dubuque Apr 16 '11 at 0:58

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.