# Factoring numbers “of the (binary quadratic) form” in two different ways

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.

-

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

-

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

-
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

Hi I can't speak english well. below sentence is true

"if Q represents m in two different ways then m is composite."

but the invers is not true in all cases,and the below sentence is not true.

"if Q represents m in unique way then m is prime." consider n=14,m=15 . this is my email address: dkhajehpoor@gmail.com

-
"if m is prime then Q represents m in unique way ." –  user11301 Jun 1 '11 at 7:31