[seqfan] Re: Finding numbers represented by indefinite binary quadratic forms

Neil Sloane njasloane at gmail.com
Wed Jun 4 17:11:45 CEST 2014


I'm having trouble with the Mathematica "Reduce" command.
It is easy to show by hand that x^2+3xy-3y^2=3 has no solutions in integers
(**)
But Reduce[x^2 + 3 xy - 3 y^2 - 3 == 0, {x, y}, Integers]
does not return "False" (***).

How can one use Mma to decide if x^2+3xy-3y^2=3
has a solution in integers?

Neil

(**) Proof. x must be divisible by 3, say x=3z,
so we get 3z^2+3yz-y^2=1; but y^2=-1 mod 3 has no solution.
(***) Mma returns

((C[1] | C[2]) ∈ Integers && xy == 1/3 (3 - 9 C[1]^2 + 27 C[2]^2) &&
   x == 3 C[1] && y == 3 C[2]) || ((C[1] | C[2]) ∈ Integers &&
   xy == 1/3 (3 - 9 C[1]^2 + 3 (1 + 3 C[2])^2) && x == 3 C[1] &&
   y == 1 + 3 C[2]) || ((C[1] | C[2]) ∈ Integers &&
   xy == 1/3 (3 - 9 C[1]^2 + 3 (2 + 3 C[2])^2) && x == 3 C[1] &&
   y == 2 + 3 C[2]),

which presumably tells us nothing.


On Wed, Jun 4, 2014 at 10:52 AM, Giovanni Resta <g.resta at iit.cnr.it> wrote:

> On 6/4/2014 4:14 PM, Neil Sloane wrote:
>
>> Dave, Thanks, that Mathematica command does indeed seem to do the job! It
>> gives (as you say) a long list of solutions if solutions exist, and
>> "false"
>> if they don't.
>>
>
> Yes, in general the Reduce command applied to quadratic Diophantine
> equations gives False if no solutions are found, a list of solutions if
> solutions are in finite number, or one or more solutions in exponential
> form, something like
> x == 1/24 (-4 + 2 ((5 - 2 Sqrt[6])^(2 C[1]) + (5 + 2 Sqrt[6])^(2 C[1])))
> with C[1] integer, if there exist infinite solutions.
>
> In case just a few equations have to be solved, there is an online applet
> by  Dario Alpern at this address:
>
> http://www.alpertron.com.ar/QUAD.HTM
>
> A nice thing about that page is that it provides also a step-by-step
> solution and that infinite solutions are represented by recurrences
> instead of exponential expressions.
>
> Giovanni
>
>
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>



-- 
Dear Friends, I have now retired from AT&T. New coordinates:

Neil J. A. Sloane, President, OEIS Foundation
11 South Adelaide Avenue, Highland Park, NJ 08904, USA.
Also Visiting Scientist, Math. Dept., Rutgers University, Piscataway, NJ.
Phone: 732 828 6098; home page: http://NeilSloane.com
Email: njasloane at gmail.com



More information about the SeqFan mailing list