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

Alonso Del Arte alonso.delarte at gmail.com
Wed Jun 4 18:04:03 CEST 2014

```Or, as Joerg might point out, you can also use 3 * x * y. If you wanted to,
you could even do 3x * y (since variable names in Mathematica can't start
with a number, it understands 3x means 3 * x).

Al

On Wed, Jun 4, 2014 at 11:58 AM, Neil Sloane <njasloane at gmail.com> wrote:

> PS Peter Moses kindly pointed out that I don't
> know how to use Mma! 3xy isn't typed 3xy,
> but 3 x y
>
> and then everything works!
>
>
>
> On Wed, Jun 4, 2014 at 11:11 AM, Neil Sloane <njasloane at gmail.com> wrote:
>
> > 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:
> >>
> >>
> >> 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.
> > Email: njasloane at gmail.com
> >
> >
>
>
> --
> 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.
> Email: njasloane at gmail.com
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>

--
Alonso del Arte
Author at SmashWords.com
<https://www.smashwords.com/profile/view/AlonsoDelarte>
Musician at ReverbNation.com <http://www.reverbnation.com/alonsodelarte>
```