W. Lang: Binary Quadratic Forms (indefinite case)



2003, 2009 update for Maple12, new OEIS address Mar 2012


March 2016: Unfortunately this program is no loner running on this machine. Sorry for this!


Indefinite Binary Quadratic Forms a x^2 + b x*y + c y^2 and Representation of Integers k (not 0)

Enter integer form coefficients [a,b,c]:               

Enter integer k (not 0, abs(k) < 10000) to be represented:          

Enter nonnegative integer N (0 for fundamental solution(s), N<100):          

  
Clear




Explanations:

  • This program works for indefinite binary quadratic forms F=[a,b,c] which have positive discriminant D:= b^2-4ac, and D is assumed to be not a perfect square. The allowed D numbers are given in N.J.A. Sloane's On-Line Encyclopedia of Integer Sequences under A07989. Submission of [a,b,c] with other D values will result in an error message.
  • gcd(a,b,c)=1 is assumed, i.e. the integers a,b, and c should have no common factor >1. Such forms F are called primitive.
  • If there exists an integer solution [x,y] of the equation F=k, standing for a x^2 + b x*y + c y^2 = k, with integer k (not 0), there will be infinitely many ones. They are derived from each so called fundamental solution [x,y]. Solutions [x,y] are called proper if gcd(x,y)=1 (i.e. x and y have no common factor >1) otherwise they are called improper. If [x,y] solves F=k, so will [-x,-y]. Therefore only the solutions [x,y] with x>=0 will be given.
  • Proper solutions will be exhibited as lists of vectors [x,y]. If there is no fundamental solution the output will be []. Similar for improper solutions which can only occur if k is not squarefree. See A0051170 for positive squarefree numbers (1 is squarefree). Note that a non-squarefree number k (see A013929) may also have proper solutions, for example F=[-5,7,2] (D=40) and k=20 or F=[1,9,-2] (D=89) and k=4.
  • The nonnegative integer N determines how many out of an infinitude of solutions generated from fundamental solutions are depicted . If 0 is entered for N then only the fundamental solutions, both proper and improper ones, are shown. Note that these solutions [x,y] may not be the ones with smallest |y| value. [1,0] may appear as proper fundamental [x,y] solution, for example for Pell eqs. x^2 - d y^2 = 1, with positive integer d. If a natural number N>0 is entered, then for each fundamental solution (proper and improper) 2N+1 solutions are shown. They result from applying the powers n=-N,...,0,...+N of a so called automorphic matrix on the fundamental solution. Therefore, the middle solution (corresponding to n=0) will always show the fundamental solution. If there is no fundamental solution the output will be [] in the proper as well as improper case.
  • A time limit of 240s is used. The Pell eq. with F=[1,0,-12345=d] and k=1 and N=0 takes about this time.
  • All [x,y] solutions have been checked before they are shown.
  • According to the theory all solutions are found but the time limit will only allow to find the smaller ones or none at all.
  • For fundamental solutions of Pell eqs. see Solving some Pell equations by Keith Matthews.
  • The underlying MAPLE9 (Maple10 update 2005; Maple12 update 2009) program has been designed according to the setup of chapter IV, paragraph 31, of the quoted book of Scholz/Schoeneberg.
  • See also Pell equation from E. Weisstein's world of mathematics.
  • Reference:

    A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973

  • Further References:

    D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989

    D. A. Cox, Primes of the Form x^2+ n y^2, Wiley, New York, 1989, Paragraph 2 A.

    L. Euler, Vollständige Anleitung zur Algebra (1770), Reclam, Leipzig, ca. 1992, English version: Elements of Algebra, Springer, 1984

    C. F. Gauss , Disquisitiones Arithmeticae (1801) (in English,transl. A. A. Clarke, rev. W. C. Waterhouse), Springer, NY, 1986 (Yale University 1966 reprint)

    J. L. Lagrange, Zusätze zu Eulers Elementen der Algebra. Unbestimmte Analysis (Übersetzung: A. J. von Oettingen, Hrsg. H. Weber), Engelmann, Leipzig 1898 (Ostwald's Klassiker der exakten Wissenschaften Nr. 103)

  • Acknowledgements:

    This application would not exist without the help from Michael Faisst (Maple9 installation) and Bernd Feucht (web-administrator). See also the Acknowledgements for the page Formatting of sequences.





Back to main page


Bottom of data