CINXE.COM
User:Peter Luschny/BinaryQuadraticForms - OeisWiki
<!DOCTYPE html> <html class="client-nojs" lang="en" dir="ltr"> <head> <meta charset="UTF-8"/> <title>User:Peter Luschny/BinaryQuadraticForms - OeisWiki</title> <script>document.documentElement.className = document.documentElement.className.replace( /(^|\s)client-nojs(\s|$)/, "$1client-js$2" );</script> <script>(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgCanonicalNamespace":"User","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":2,"wgPageName":"User:Peter_Luschny/BinaryQuadraticForms","wgTitle":"Peter Luschny/BinaryQuadraticForms","wgCurRevisionId":1659479,"wgRevisionId":1659479,"wgArticleId":209692,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"User:Peter_Luschny/BinaryQuadraticForms","wgRelevantArticleId":209692,"wgRequestId":"190cb2993cba7f02219147aa","wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgRelevantUserName":"Peter Luschny","wgFlaggedRevsParams":{"tags":{"style":{"levels":2,"quality":2,"pristine":4}}},"wgStableRevisionId":null});mw.loader.state({"site.styles":"ready","noscript":"ready","user.styles":"ready","user":"ready","user.options":"loading","user.tokens":"loading","mediawiki.legacy.shared":"ready","mediawiki.legacy.commonPrint":"ready","mediawiki.sectionAnchor":"ready","mediawiki.skinning.interface":"ready","mediawiki.skinning.content.externallinks":"ready","skins.monobook.styles":"ready"});mw.loader.implement("user.options@0bhc5ha",function($,jQuery,require,module){mw.user.options.set([]);});mw.loader.implement("user.tokens@0jlvv7z",function ( $, jQuery, require, module ) { mw.user.tokens.set({"editToken":"+\\","patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});/*@nomin*/ });mw.loader.load(["site","mediawiki.page.startup","mediawiki.user","mediawiki.hidpi","mediawiki.page.ready","mediawiki.toc","mediawiki.searchSuggest"]);});</script> <link rel="stylesheet" href="/w/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.content.externallinks%7Cmediawiki.skinning.interface%7Cskins.monobook.styles&only=styles&skin=monobook"/> <script async="" src="/w/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=monobook"></script> <!--[if IE 6]><link rel="stylesheet" href="/w/skins/MonoBook/IE60Fixes.css?303" media="screen"/><![endif]--><!--[if IE 7]><link rel="stylesheet" href="/w/skins/MonoBook/IE70Fixes.css?303" media="screen"/><![endif]--> <meta name="ResourceLoaderDynamicStyles" content=""/> <meta name="generator" content="MediaWiki 1.30.0"/> <link rel="shortcut icon" href="/favicon.ico"/> <link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="OeisWiki (en)"/> <link rel="EditURI" type="application/rsd+xml" href="https://oeis.org/w/api.php?action=rsd"/> <link rel="license" href="/wiki/The_OEIS_End-User_License_Agreement"/> <link rel="alternate" type="application/atom+xml" title="OeisWiki Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"/> <!--[if lt IE 9]><script src="/resources/lib/html5shiv/html5shiv.min.js"></script><![endif]--> </head> <body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-2 ns-subject page-User_Peter_Luschny_BinaryQuadraticForms rootpage-User_Peter_Luschny skin-monobook action-view"><div id="globalWrapper"> <div id="column-content"> <div id="content" class="mw-body" role="main"> <a id="top"></a> <div id="siteNotice" class="mw-body-content"><div id="localNotice" lang="en" dir="ltr"><div class="mw-parser-output"><p>This site is supported by donations to <a rel="nofollow" class="external text" href="http://oeisf.org/">The OEIS Foundation</a>. </p></div></div></div> <div class="mw-indicators mw-body-content"> </div> <h1 id="firstHeading" class="firstHeading" lang="en">User:Peter Luschny/BinaryQuadraticForms</h1> <div id="bodyContent" class="mw-body-content"> <div id="siteSub">From OeisWiki</div> <div id="contentSub"><span class="subpages">< <a href="/wiki/User:Peter_Luschny" title="User:Peter Luschny">User:Peter Luschny</a></span></div> <div id="jump-to-nav" class="mw-jump">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div> <!-- start content --> <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="mw-parser-output"><div style="width: 640px; text-align: justify;"> <div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div> <ul> <li class="toclevel-1"><a href="#Positive_Numbers_represented_by_aBinary_Quadratic_Form"><span class="tocnumber">1</span> <span class="toctext">Positive Numbers represented by aBinary Quadratic Form</span></a> <ul> <li class="toclevel-2"><a href="#Definitions"><span class="tocnumber">1.1</span> <span class="toctext">Definitions</span></a></li> <li class="toclevel-2"><a href="#Geometric_view"><span class="tocnumber">1.2</span> <span class="toctext">Geometric view</span></a></li> <li class="toclevel-2"><a href="#Some_examples_at_a_glance"><span class="tocnumber">1.3</span> <span class="toctext">Some examples at a glance</span></a></li> <li class="toclevel-2"><a href="#A_Sage_based_Python_class:_.27binaryQF.28a.2C_b.2C_c.29.27"><span class="tocnumber">1.4</span> <span class="toctext">A Sage based Python class: 'binaryQF(a, b, c)'</span></a> <ul> <li class="toclevel-3"><a href="#Algorithms"><span class="tocnumber">1.4.1</span> <span class="toctext">Algorithms</span></a></li> <li class="toclevel-3"><a href="#The_main_function"><span class="tocnumber">1.4.2</span> <span class="toctext">The main function</span></a></li> <li class="toclevel-3"><a href="#Implementation"><span class="tocnumber">1.4.3</span> <span class="toctext">Implementation</span></a></li> </ul> </li> <li class="toclevel-2"><a href="#Computations"><span class="tocnumber">1.5</span> <span class="toctext">Computations</span></a></li> <li class="toclevel-2"><a href="#Utility_functions"><span class="tocnumber">1.6</span> <span class="toctext">Utility functions</span></a></li> <li class="toclevel-2"><a href="#List_of_positive_definite_quadratic_forms"><span class="tocnumber">1.7</span> <span class="toctext">List of positive definite quadratic forms</span></a></li> <li class="toclevel-2"><a href="#List_of_indefinite_quadratic_forms"><span class="tocnumber">1.8</span> <span class="toctext">List of indefinite quadratic forms</span></a></li> <li class="toclevel-2"><a href="#Number_of_represented_integers_below_N_as_a_function_of_the_discriminant"><span class="tocnumber">1.9</span> <span class="toctext">Number of represented integers below N as a function of the discriminant</span></a></li> <li class="toclevel-2"><a href="#References"><span class="tocnumber">1.10</span> <span class="toctext">References</span></a></li> </ul> </li> </ul> </div> <h1 style="background: orange; color: blue; text-align: center; letter-spacing: 2px; line-height: 150%; font-weight:bold;"><span class="mw-headline" id="Positive_Numbers_represented_by_aBinary_Quadratic_Form">Positive Numbers<br /> represented by a<br />Binary Quadratic Form</span></h1> <p> Aim of this post is to implement the methods for calculating the numbers represented by a binary quadratic form in a uniform and efficient way in Sage and hiding the complexity of the situation by providing a simple interface to the user. This blog post was inspired by the Wiki page created by N. J. A. Sloane, see: <a href="/wiki/Binary_Quadratic_Forms_and_OEIS" title="Binary Quadratic Forms and OEIS"> Binary Quadratic Forms and OEIS</a> </p> <h2 style="color: maroon;"><span class="mw-headline" id="Definitions">Definitions</span></h2> <p>A binary quadratic form over Z is a quadratic homogeneous polynomial in two variables with integer coefficients, q(x, y) = ax^2 + bxy + cy^2. It is conveniently given by a list or tuple of 3 entries: (a, b, c). </p> <p>A quadratic form q(x, y) represents an integer n if there exist integers x and y with q(x, y) = n. We say that q primitively represents n if there exist relatively prime integers x and y such that q(x, y) = n. </p> <p> Positive definite forms are definite forms with a > 0. They can only represent positive numbers. Negative definite forms are definite forms with a < 0. They can represent only negative numbers. Indefinite forms can represent both positive and negative numbers. </p> <p> The discriminant of a nondegenerate binary quadratic form is b^2 - 4ac. Inequivalent forms may have the same discriminant. Quadratic forms with different discriminants cannot be equivalent. </p> <h2 style="color: maroon;"><span class="mw-headline" id="Geometric_view">Geometric view</span></h2> <center> <p><a href="/wiki/File:BinaryQF111LevelSet13.png" class="image"><img alt="BinaryQF111LevelSet13.png" src="/w/images/c/c4/BinaryQF111LevelSet13.png" width="584" height="584" /></a> </p> </center> <p> The graphic shows the level set of the binary quadratic form x^2+x*y+y^2 and the lattice points of the level set 13. The integral values (x, y) = (3, 1), (1, 3), (-1, 4), (-3, 4), (-4, 3), (-4, 1), (-3, -1), (-1, -3), (1, -4), (3, -4), (4, -3) and (4, -1) are points of the ellipse. Therefore 13 is represented by the form. </p> <center> <p><a href="/wiki/File:BinaryQF111LevelSet14.png" class="image"><img alt="BinaryQF111LevelSet14.png" src="/w/images/b/b3/BinaryQF111LevelSet14.png" width="584" height="584" /></a> </p> </center> <p>14 is not represented by the binary quadratic form x^2+x*y+y^2, no lattice points of the level set lie on the ellipse.</p> <h2 style="color: maroon;"><span class="mw-headline" id="Some_examples_at_a_glance">Some examples at a glance</span></h2> <p>The table below collocates a few sequences in the OEIS which list numbers represented by binary quadratic forms. If an entry in the table below shows multiple sequences this means that the sequences differ only by some initial terms or the equivalence of their definitions is not proved. </p> <center> <table cellpadding="6" cellspacing="6" border="1px solid #808000;" style="text-align:center; font-size:small"> <tr style="font-size: small; color: blue; background-color:#FFD700; text-align:center"> <td>(a, b, c)</td> <td>b^2-4ac</td> <td>prime</td> <td>primitively</td> <td>positive</td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 0, -3)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">12</td> <td><a href="http://oeis.org/A068228">A068228</a>, <a href="http://oeis.org/A141122">A141122</a></td> <td><a href="http://oeis.org/A243655">A243655</a></td> <td><a href="http://oeis.org/A084916">A084916</a></td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 1, -2)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">9</td> <td><a href="http://oeis.org/A002476">A002476</a>, <a href="http://oeis.org/A007645">A007645</a></td> <td><a href="http://oeis.org/A244713">A244713</a></td> <td><a href="http://oeis.org/A056991">A056991</a>, <a href="http://oeis.org/A242660">A242660</a></td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 0, -2)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">8</td> <td><a href="http://oeis.org/A001132">A001132</a>, <a href="http://oeis.org/A038873">A038873</a></td> <td><a href="http://oeis.org/A057126">A057126</a></td> <td><a href="http://oeis.org/A035251">A035251</a></td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 1, -1)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">5</td> <td><a href="http://oeis.org/A038872">A038872</a>, <a href="http://oeis.org/A141158">A141158</a></td> <td><a href="http://oeis.org/A089270">A089270</a></td> <td><a href="http://oeis.org/A031363">A031363</a></td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 0, -1)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">4</td> <td><a href="http://oeis.org/A065091">A065091</a></td> <td><a href="http://oeis.org/A047486">A047486</a></td> <td><a href="http://oeis.org/A042965">A042965</a></td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 1, 0)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center"> 1</td> <td><a href="http://oeis.org/A000040">A000040</a>, <a href="http://oeis.org/A006005">A006005</a></td> <td><a href="http://oeis.org/A000027">A000027</a>, <a href="http://oeis.org/A001477">A001477</a></td> <td><a href="http://oeis.org/A000027">A000027</a>, <a href="http://oeis.org/A001477">A001477</a></td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 1, 1)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">-3</td> <td><a href="http://oeis.org/A002476">A002476</a>, <a href="http://oeis.org/A007645">A007645</a></td> <td><span><a href="http://oeis.org/A034017">A034017</a></span></td> <td><a href="http://oeis.org/A003136">A003136</a>, <a href="http://oeis.org/A035238">A035238</a>,<br /> <p><a href="http://oeis.org/A045375">A045375</a>, <a href="http://oeis.org/A123365">A123365</a>,<br /> </p> <a href="http://oeis.org/A144919">A144919</a>, <a href="http://oeis.org/A144921">A144921</a></td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 0 ,1)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">-4</td> <td><a href="http://oeis.org/A002144">A002144</a>, <a href="http://oeis.org/A002313">A002313</a></td> <td><a href="http://oeis.org/A008784">A008784</a></td> <td><a href="http://oeis.org/A001481">A001481</a></td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 1, 2)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">-7</td> <td><a href="http://oeis.org/A033207">A033207</a>, <a href="http://oeis.org/A045373">A045373</a></td> <td><a href="http://oeis.org/A244779">A244779</a></td> <td><a href="http://oeis.org/A028951">A028951</a>, <a href="http://oeis.org/A035248">A035248</a> </td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 0 , 2)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">-8</td> <td><a href="http://oeis.org/A033200">A033200</a>, <a href="http://oeis.org/A033203">A033203</a></td> <td><a href="http://oeis.org/A057127">A057127</a></td> <td><a href="http://oeis.org/A002479">A002479</a> </td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 1, 3)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">-11</td> <td><a href="http://oeis.org/A056874">A056874</a></td> <td><a href="http://oeis.org/A244780">A244780</a></td> <td><a href="http://oeis.org/A028954">A028954</a>, <a href="http://oeis.org/A035247">A035247</a> </td> </tr> <tr> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">(1, 0, 3)</td> <td style="font-size: small; color: blue; background-color:#FFD700; text-align:center">-12</td> <td><a href="http://oeis.org/A002476">A002476</a>, <a href="http://oeis.org/A007645">A007645</a></td> <td><a href="http://oeis.org/A244819">A244819</a></td> <td><a href="http://oeis.org/A003136">A003136</a> </td> </tr> </table> </center> <p> The oldest sequences in the table (defined here by the lowest A-number) are (apart from the natural numbers and the prime numbers) <a href="http://oeis.org/A001132">A001132</a> (primes ≡ ± 1 mod 8) and <a href="http://oeis.org/A001481">A001481</a> (numbers that are the sum of 2 squares), which nicely sets the arithmetic theme. </p> <p> Note that only numbers n ≡ 0 (mod 4) or n ≡ 1 (mod 4) can be a discriminant (..., -8, -7, -4, -3, 0, 1, 4, 5, 8, ...). </p> <p>Also note that reading a row in the table from the left to the right we have the inclusion "represented primes" ⊆ "primitively represented" ⊆ "represented positives". For example in the case of discriminant 4 the inclusion is <a href="http://oeis.org/A065091">A065091</a> ⊆ <a href="http://oeis.org/A047486">A047486</a> ⊆ <a href="http://oeis.org/A042965">A042965</a> where '⊆' is to be read as 'is subsequence of'. </p> <p>Prime numbers which are represented by a binary quadratic form are primitively represented by this form. N. J. A. Sloane gave the following short proof on the seq-fan list: </p> <p style="text-align: justify; font-style: italic"> "For if ax^2+bxy+cy^2 = p and gcd(x, y) = d > 1, then d divides p, so d = p. Then let x = pX, y = pY, so ap^2X^2+bp^2XY+cp^2Y^2 = p, so p^2 divides p, a contradiction." </p> <h2 style="color: maroon;"><span class="mw-headline" id="A_Sage_based_Python_class:_.27binaryQF.28a.2C_b.2C_c.29.27">A Sage based Python class: 'binaryQF(a, b, c)'</span></h2> <h3 style="color: maroon;"><span class="mw-headline" id="Algorithms">Algorithms</span></h3> <p> We consider 9 cases in dependence of the determinant D = b^2 - 4ac and required restrictions on the generated integers: prime, primitively represented or all positive values. The table below shows the algorithms used.</p> <ul> <li>sfb: Extension of Sloane's 'fb' function.</li> <li>qfb: Pari's qfbsolve function.</li> <li>qfs: A search function based on a hint by R. Israel.</li> <li>qfr: Pari's qfrep function.</li> <li>jcp: Port of Will Jagy's C++ programs 'ConwayPositivePrimitive' and<br />'ConwayPositiveAll'.</li> </ul> <center> <table cellpadding="4" cellspacing="4" style="text-align: center; border-style: solid; border-width: 2px;"> <caption>Algorithms used in the class binaryQF(a, b, c)</caption> <tr style="text-align: left; color: blue; background-color: #FFCC66;"> <td>D = b^2 - 4ac, D != 0</td> <td>prime</td> <td>primitively</td> <td>positive </td> </tr><tr> <td style="text-align: left; color: blue; background-color: #FFCC66;">D = k^2, k != 0 (square)</td> <td>sfb </td> <td>sfb </td> <td>sfb </td> </tr><tr> <td style="text-align: left; color: blue; background-color: #FFCC66;">D < 0 (definite, imaginary)</td> <td>qfb </td> <td>qfs </td> <td>qfr </td> </tr><tr> <td style="text-align: left; color: blue; background-color: #FFCC66;">D > 0 (indefinite, real)</td> <td>jcp </td> <td>jcp </td> <td>jcp </td> </tr> </table> </center> <p><br /> </p> <h3 style="color: maroon;"><span class="mw-headline" id="The_main_function">The main function</span></h3> <p>The aim of this implementation is to bundle all the different algorithms and resources in a Sage class and provide it uniformly to the user through a single function.</p> <pre> represented_positives( N, # list represented numbers in the range (1..N) subset, # {'all', 'primitively', 'prime'}, default 'all' verbose # print info, default true ) </pre> <p>The function is implemented as a member of the class 'binaryQF'. All other functions in the class are supporting functions for this main function.</p> <p>A typical use case is:</p> <pre> Q = binaryQF([5, 4, 2]) Q.represented_positives(100, 'prime') </pre> <p>This will output:</p> <pre> Original form [5, 4, 2] with discriminant -24 Reduced form [2, 0, 3] There are 8 primes represented up to 100 [2, 3, 5, 11, 29, 53, 59, 83] </pre> <p>One can feed this output into Sage's oeis function</p> <pre> oeis([2, 3, 5, 11, 29, 53, 59, 83], max_results = 4) </pre> <p>which returns</p> <pre> 0: <a href="http://oeis.org/A084865">A084865</a>: Primes of the form 2x^2 + 3y^2. </pre> <p> Below we will additionally introduce a function 'lookup_OEIS' which can be used in connection with a local installation of the database. </p> <h3 style="color: maroon;"><span class="mw-headline" id="Implementation">Implementation</span></h3> <p> Note: The implementation below was written in 2014 with Python 2. An updated version using Python 3.10 can be found on <a rel="nofollow" class="external text" href="https://github.com/PeterLuschny/BinaryQuadraticForms">GitHub</a>. </p> <pre style="color:blue"> class binaryQF(): """ A binary quadratic form over Z. Input: a list of 3 entries: [a, b, c] """ def __init__(self, abc): self._a, self._b, self._c = [ZZ(x) for x in abc] def discriminant(self): return self._b**2 - 4 * self._a * self._c def sqr_disc(self, M, primitively = False): d = self.discriminant() if d == 0: raise ValueError, "discriminant must not be zero" a, b, c = self._a, self._b, self._c if a == 0 and c == 0: # and b != 0 return [b*n for n in (1..M//abs(b))] D = Integer(d).sqrtrem()[0] # a must be != 0 if a == 0: # then c != 0; swap a = c c = 0 k = 2 * D; m = 4 * a * D u = b + D; v = b - D S = set() # Solvability in Z. for n in (1..M): h = 4 * a * n # a != 0 and n != 0 for t in h.divisors(): g = h // t if k.divides(g - t) and m.divides(g * u - t * v): if primitively: y = (g - t) // k x = var('x') eq = a * x * x + b * x * y + c * y * y R = (eq - n).roots(multiplicities = False, ring = ZZ) x = R[0] if gcd(x, y) == 1: S.add(n) break else: S.add(n) break return sorted(list(S)) def imag_prime(self, M): solve = pari('qfbsolve') Q = pari('Qfb')(self._a, self._b, self._c) p = 1 r = [] while True: p = next_prime(p) if p > M: break if solve(Q, p): r.append(p) return r def imag_primitively(self, M): a, b, c = self._a, self._b, self._c d = c - b * b / (4 * a) A = [] for y in (0..isqrt(M / d)): r = y * b / (2 * a) s = sqrt((M - d * y * y) / a) for x in (ceil(-s -r)..floor(s - r)): if gcd(x, y) == 1: A.append(a * x^2 + b * x * y + c * y^2) return sorted(Set(A).list()) def imag_all(self, M): L = [2*ZZ(self._a), ZZ(self._b), ZZ(self._b), 2*ZZ(self._c)] G = Matrix(ZZ, 2, 2, L) A = pari('qfrep')(G, M, 1) return [k+1 for k in (0..M-1) if A[k] > 0] def _primitive_reps(self, a, h, b, M, S): if a <= M : S.add(a) if b <= M : S.add(b) if a <= (M - b) and h <= (M - a - b) : if a <= (M - a - h) : self._primitive_reps(a, h + 2 * a, a + b + h, M, S) if b <= (M - b - h) : self._primitive_reps(a + b + h, h + 2 * b, b, M, S) def positive_primitives(self, M, primitively): a, b, c = self._a, self._b, self._c S = set() while True: new_val = a + b + c if new_val > 0 : self._primitive_reps(a, b + 2 * a, new_val, M, S) b += 2 * c a = new_val elif new_val < 0 : b += 2 * a c = new_val if a == self._a and b == self._b and c == self._c: break if not primitively : X = set() for p in S: q = t = 1 while q <= M : X.add(q) q = t * t * p t += 1 S = X return S def reduce_real(self): d = self.discriminant() if is_square(d): raise ValueError, "form must not have square discriminant" droot = Integer(d).sqrtrem()[0] a, b, c = self._a, self._b, self._c while a <= 0 or c >= 0 or b <= abs(a + c): cAbs = c if cAbs < 0: cAbs *= -1 # cAbs = 0 will not happen for a non square form delta = (b + droot) // (2 * cAbs) if c < 0: delta *= -1 aa = c bb = 2 * c * delta - b cc = c * delta * delta - b * delta + a a, b, c = aa, bb, cc return [a, b, c] def reduce_imag(self): a, b, c = self._a, self._b, self._c if a < 0: a, b, c = -a, -b, -c d = self.discriminant() while True: A = ( a == c and b < 0) or (c < a) B = (-a == b and a < c) or (a < abs(b)) if not (A or B) : break if A: a, b, c = c, -b, a if B: b -= 2 * a * (b // (2 * a)) if abs(b) > a: b -= 2 * a c = (b * b - d) // (4 * a) return [a, b, c] def is_reduced(self): a, b, c = self._a, self._b, self._c return (-a < b <= a < c) or (ZZ(0) <= b <= a == c) def reduced_form(self): """ Returns the unique reduced form equivalent to BQF(a,b,c) """ if self.is_reduced() : return self if self.discriminant() >= 0: r = self.reduce_real() else: r = self.reduce_imag() return binaryQF(r) def represented_positives(self, M, subset = "all", verbose = True): """ subset = "all" or "primitively" or "prime" """ prime = False or subset == "prime" primitively = False or subset == "primitively" d = self.discriminant() if d == 0: raise ValueError, "discriminant must not be 0" a, b, c = self._a, self._b, self._c if verbose: print "Original form ", [a, b, c], "with discriminant", d if is_square(d): if verbose: print "Square discriminant!" if prime: # for efficiency primitively = False pp = self.sqr_disc(M, primitively) if prime: pp = filter(is_prime, pp) else: R = self.reduced_form() if verbose: print "Reduced form ", [R._a, R._b, R._c] if d < 0: if prime: pp = R.imag_prime(M) else: if primitively: pp = R.imag_primitively(M) else: pp = R.imag_all(M) # real case, indefinite form else: # d > 0 and not square if prime: # for efficiency primitively = True pp = R.positive_primitives(M, primitively) if prime: pp = filter(is_prime, pp) pp = sorted(pp) if verbose: msg0 = "primes" if prime else "positive integers" msg1 = "primitively" if primitively else "" msg2 = "represented up to" print "There are", len(pp), msg0, msg1, msg2, M return pp </pre> <p><br /> </p> <h2 style="color: maroon;"><span class="mw-headline" id="Computations">Computations</span></h2> <pre> # <a href="http://oeis.org/A243655">A243655</a> Q = binaryQF([1, 0, -3]) Q.represented_positives(100, 'primitively') # Original form [1, 0, -3] with discriminant 12. # Reduced form [1, 2, -2] # There are 13 positive integers primitively represented up to 100. # [1, 6, 13, 22, 33, 37, 46, 61, 69, 73, 78, 94, 97] # With N = 100000: time: CPU 0.14 s, Wall: 0.16 s # <a href="http://oeis.org/A244291">A244291</a> Q = binaryQF([1, 6, -3]) Q.represented_positives(100, 'primitively') # Original form (1, 6, -3) with discriminant 48 # Reduced form (1, 6, -3) # There are 12 positive integers primitively represented up to 100 # [1, 4, 13, 24, 33, 37, 52, 61, 69, 73, 88, 97] # With N = 100000: time: CPU 0.16 s, Wall: 0.19 s # <a href="http://oeis.org/A084916">A084916</a> Q = binaryQF([1, 0, -3]) Q.represented_positives(50) # Original form [1, 0, -3] with discriminant 12. # Reduced form [1, 2, -2] # There are 14 positive integers represented up to 50. # [1, 4, 6, 9, 13, 16, 22, 24, 25, 33, 36, 37, 46, 49] # With N = 100000: time: CPU 0.19 s, Wall: 0.21 s # <a href="http://oeis.org/A141175">A141175</a> Q = binaryQF([-1, 4, 4]) Q.represented_positives(100, 'prime') #Q = binaryQF([7, 12, 4]) #Q.represented_positives(100, 'prime') # Original form [-1, 4, 4] with discriminant 32. # Reduced form [4, 4, -1] # There are 6 primes represented up to 100. # [7, 23, 31, 47, 71, 79] # With N = 100000: time: CPU 0.24 s, Wall: 0.27 s # <a href="http://oeis.org/A035269">A035269</a> Q = binaryQF([2, 3, -4]) Q.represented_positives(33) # Original form [2, 3, -4] with discriminant 41. # Reduced form [2, 3, -4] # There are 14 positive integers represented up to 33. # [1, 2, 4, 5, 8, 9, 10, 16, 18, 20, 23, 25, 31, 32] # With N = 100000: time: CPU 0.55 s, Wall: 0.60 s # <a href="http://oeis.org/A056991">A056991</a>, <a href="http://oeis.org/A242660">A242660</a> Q = binaryQF([1, 1, -2]) Q.represented_positives(30) # Original form [1, 1, -2] with discriminant 9. # Square discriminant! # There are 13 positive integers represented up to 30 # [1, 4, 7, 9, 10, 13, 16, 18, 19, 22, 25, 27, 28] # With N = 100000: time: CPU 18.10 s, Wall: 18.95 s # <a href="http://oeis.org/A002476">A002476</a> Q = binaryQF([1, 1, -2]) Q.represented_positives(100, 'prime') # Original form [1, 1, -2] with discriminant 9. # Square discriminant! # There are 11 primes represented up to 100. # [7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97] # With N = 100000: time: CPU 18.92 s, Wall: 19.80 s # <a href="http://oeis.org/A107132">A107132</a> Q = binaryQF([2, 0, 13]) Q.represented_positives(500, 'prime') # Original form [2, 0, 13] with discriminant -104. # Reduced [2, 0, 13] # There are 10 primes represented up to 500. # [2, 13, 31, 149, 167, 317, 359, 397, 463, 487] # With N = 100000: time: CPU 0.18 s, Wall: 0.20 s # <a href="http://oeis.org/A045373">A045373</a> Q = binaryQF([1, 1, 2]) Q.represented_positives(109, 'prime') # Original form [1, 1, 2] with discriminant -7. # Reduced [1, 1, 2] # There are 13 primes represented up to 109. # [2, 7, 11, 23, 29, 37, 43, 53, 67, 71, 79, 107, 109] # With N = 100000: time: CPU 0.27 s, Wall: 0.30 s # <a href="http://oeis.org/A033203">A033203</a> Q = binaryQF([1, 0, 2]) Q.represented_positives(100, 'prime') # Original form [1, 0, 2] with discriminant -8 # Reduced [1, 0, 2] # There are 13 primes represented up to 100. # [2, 3, 11, 17, 19, 41, 43, 59, 67, 73, 83, 89, 97] # With N = 100000: time: CPU 0.26 s, Wall: 0.29 s Q = binaryQF([2, -1, 17]) Q.represented_positives(100000, 'prime') # Original form [2, -1, 17] with discriminant -135 # Reduced [2, -1, 17] # There are 1609 primes represented up to 100000. # [2, 17, 23, 53, 83, 137, ..., 99623, 99707, 99713, 99833] # With N = 100000: time: CPU 0.20 s, Wall: 0.22 s # <a href="http://oeis.org/A028951">A028951</a>, <a href="http://oeis.org/A035248">A035248</a> Q = binaryQF([1, 1, 2]) Q.represented_positives(30) # Original form [1, 1, 2] with discriminant -7 # There are 15 positive integers represented up to 30 # [1, 2, 4, 7, 8, 9, 11, 14, 16, 18, 22, 23, 25, 28, 29] # With N = 100000: time: CPU 1.68 s, Wall: 2.31 s # <a href="http://oeis.org/A003136">A003136</a> Q = binaryQF([1, 1, 1]) Q.represented_positives(30) # Original form [1, 1, 1] with discriminant -3 # There are 13 positive integers represented up to 30 # [1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25, 27, 28] # With N = 100000: time: CPU 1.19 s, Wall: 1.39 s # <a href="http://oeis.org/A001481">A001481</a> Q = binaryQF([1, 0, 1]) Q.represented_positives(30) # Original form [1, 0, 1] with discriminant -4 # Reduced [1, 0, 1] # There are 15 positive integers represented up to 30 # [1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, 26, 29] # With N = 100000: time: CPU 1.08 s, Wall: 1.21 s # <a href="http://oeis.org/A244019">A244019</a> Q = binaryQF([9, 6, 1849]) Q.represented_positives(18000, 'prime') # Original form [9, 6, 1849] with discriminant -66528 # Reduced [9, 6, 1849] # There are 44 primes represented up to 18000 # [1873, 2017, 2137, 2377, 2473, 2689, 3217, 3529, 3697, 4057, 4657, 5569, # 6073, 6337, 7177, 7393, 7417, 7561, 7681, 7753, 8017, 8089, 8233, 8353, # 8737, 8761, 9241, 9601, 9769, 11113, 11257, 11617, 12049, 12433, 12457, # 12721, 13297, 13633, 13729, 14281, 15073, 15313, 16417, 17977] # With N = 100000: time: CPU 0.14 s, Wall: 0.16 s # <a href="http://oeis.org/A139668">A139668</a> Q = binaryQF([1, 0, 1848]) Q.represented_positives(18000, 'prime') # Original form [1, 0, 1848] with discriminant -7392 # Reduced [1, 0, 1848] # There are 49 primes represented up to 18000 # [1873, 2017, 2137, 2377, 2473, 2689, 3217, 3529, 3697, 4057, 4657, 5569, # 6073, 6337, 7177, 7393, 7417, 7561, 7681, 7753, 8017, 8089, 8233, 8353, # 8737, 8761, 9241, 9601, 9769, 11113, 11257, 11617, 12049, 12433, 12457, # 12721, 13297, 13633, 13729, 14281, 15073, 15313, 16417, 16633, 16657, # 16921, 16993, 17257, 17977] # With N = 100000: time: CPU 0.13 s, Wall: 0.15 s Q = binaryQF([0, 233, 3]) Q.represented_positives(2000, 'prime') #Q = binaryQF([3, 229, -154]) #Q.represented_positives(2000, 'prime') # Original form [0, 233, 3] with discriminant 54289 # Square discriminant! # There are 4 primes represented up to 2000 # [3, 311, 1709, 1867] # With N = 100000: time: CPU 36.50 s, Wall: 37.73 s # <a href="http://oeis.org/A141175">A141175</a>, <a href="http://oeis.org/A007522">A007522</a> Q = binaryQF([-1, 0, 8]) Q.represented_positives(100, 'prime') # Original form (-1, 0, 8) with discriminant 32 # Reduced form (4, 4, -1) # There are 6 primes represented up to 100 # [7, 23, 31, 47, 71, 79] # With N = 100000: time: CPU 0.36 s, Wall: 0.40 s # <a href="http://oeis.org/A035269">A035269</a> Q = binaryQF([-5, 1, 2]) Q.represented_positives(33) # Original form (-5, 1, 2) with discriminant 41 # Reduced form (2, 3, -4) # There are 14 positive integers represented up to 33 # [1, 2, 4, 5, 8, 9, 10, 16, 18, 20, 23, 25, 31, 32] # With N = 100000: time: CPU 0.52 s, Wall: 0.57 s # <a href="http://oeis.org/A002313">A002313</a> Q = binaryQF([41, 100, 61]) Q.represented_positives(50, 'prime') # Original form (41, 100, 61) with discriminant -4 # Reduced (1, 0, 1) # There are 7 primes represented up to 50 # [2, 5, 13, 17, 29, 37, 41] # With N = 100000: CPU 0.25 s, Wall: 0.29 s # <a href="http://oeis.org/A002479">A002479</a> Q = binaryQF([-1, -2, -3]) Q.represented_positives(30) # Original form (-1, -2, -3) with discriminant -8 # Reduced (1, 0, 2) # There are 17 positive integers represented up to 30 # [1, 2, 3, 4, 6, 8, 9, 11, 12, 16, 17, 18, 19, 22, 24, 25, 27] # With N = 100000: CPU 0.25 s, Wall: 0.29 s # <a href="http://oeis.org/A035251">A035251</a> Q = binaryQF([1, 0, -2]) Q.represented_positives(30) # Original form (1, 0, -2) with discriminant 8 # Reduced form (1, 2, -1) # There are 13 positive integers represented up to 30 # [1, 2, 4, 7, 8, 9, 14, 16, 17, 18, 23, 25, 28] # With N = 100000: CPU 0.33 s, Wall: 0.38 s # <a href="http://oeis.org/A002480">A002480</a> Q = binaryQF([5, 4, 2]) Q.represented_positives(40) # Original form (5, 4, 2) with discriminant -24 # Reduced (2, 0, 3) # There are 15 positive integers represented up to 40 # [2, 3, 5, 8, 11, 12, 14, 18, 20, 21, 27, 29, 30, 32, 35] # With N = 100000: CPU 1.14 s, Wall: 1.27 s </pre> <h2 style="color: maroon;"><span class="mw-headline" id="Utility_functions">Utility functions</span></h2> <ul> <li>OEIS_ID(list, n)<br /> Tries to find n sequences which match the list.<br />  </li> <li>lookup_OEIS(q, subset)<br /> Tries to find sequences which are represented by the binary quadratic form with coefficient list q = [a, b, c] and which have elements in the 'subset', which is one of  'all', 'primitively' or 'prime'. </li> </ul> <pre style="color:blue"> SloaneEncyclopedia.install() # Comment this line out after the first call. This function updates # the database and it is sufficient to call it only once in a while. def OEIS_ID(T, num) : if len(T) < 3: return [] S = T[1:min(len(T),20)] R = SloaneEncyclopedia.find(S, num) if R == [] : U = filter(lambda z: z != 0 , S) del U[0] R = SloaneEncyclopedia.find(U, num) A = [r[0] for r in R] s = [] for a in A : sa = str(a) L = "<a href="http://oeis.org/A000000">A000000</a>"[0:7-len(sa)] s.append(L + sa) return s def lookup_OEIS(q, filter = 'all'): d = q[1]^2 - 4*q[0]*q[2] sl = 100 if filter == 'prime' else 50 # make sure that seq is long enough for l in (0..2): Q = binaryQF(q) rep = Q.represented_positives(sl, filter, verbose = False) if len(rep) >= 12: break else: sl *= 10 if rep <> []: short = rep[:min(len(rep),11)] print d, q, short, OEIS_ID(rep, 2) else: print d, q </pre> <p>Examples:</p> <pre> lookup_OEIS((1,1,1), 'all') lookup_OEIS((1,1,1), 'prime') lookup_OEIS((1,1,1), 'primitively') </pre> <pre> -3 (1, 1, 1) [1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25] [<a href="http://oeis.org/A003136">A003136</a>, <a href="http://oeis.org/A035238">A035238</a>] -3 (1, 1, 1) [3, 7, 13, 19, 31, 37, 43, 61, 67, 73] [<a href="http://oeis.org/A002476">A002476</a>, <a href="http://oeis.org/A007645">A007645</a>] -3 (1, 1, 1) [1, 2, 4, 7, 8, 11, 14, 16, 22, 23, 28] [<a href="http://oeis.org/A034017">A034017</a>] </pre> <pre> lookup_OEIS((1,1,2), 'all') lookup_OEIS((1,1,2), 'prime') lookup_OEIS((1,1,2), 'primitively') </pre> <pre> -7 (1, 1, 2) [1, 2, 4, 7, 8, 9, 11, 14, 16, 18, 22] [<a href="http://oeis.org/A028951">A028951</a>, <a href="http://oeis.org/A035248">A035248</a>] -7 (1, 1, 2) [2, 7, 11, 23, 29, 37, 43, 53, 67, 71] [<a href="http://oeis.org/A033207">A033207</a>, <a href="http://oeis.org/A045373">A045373</a>] -7 (1, 1, 2) [1, 2, 4, 7, 8, 11, 14, 16, 22, 23, 28] [<a href="http://oeis.org/A244779">A244779</a>] </pre> <p><br /> </p> <h2 style="color: maroon;"><span class="mw-headline" id="List_of_positive_definite_quadratic_forms">List of positive definite quadratic forms</span></h2> <pre style="color:blue"> def posDefQF(): c = 1 while True: yield (1, 1, c) yield (1, 0, c) c += 1 def listPosDefQF(len, filter = 'all'): F = posDefQF() for i in range(len): q = F.next() lookup_OEIS(q, filter) </pre> <p>Calls to listPosDefQF(100) and listPosDefQF(100, 'prime') produce, when combined, the list:</p> <pre> -3 (1, 1, 1) [1, 3, 4, 7, 9, 12, 13, 16, 19, 21] ['<a href="http://oeis.org/A003136">A003136</a>', '<a href="http://oeis.org/A034022">A034022</a>'] -3 (1, 1, 1) [3, 7, 13, 19, 31, 37, 43, 61, 67, 73] ['<a href="http://oeis.org/A002476">A002476</a>', '<a href="http://oeis.org/A007645">A007645</a>'] -4 (1, 0, 1) [1, 2, 4, 5, 8, 9, 10, 13, 16, 17] ['<a href="http://oeis.org/A001481">A001481</a>'] -4 (1, 0, 1) [2, 5, 13, 17, 29, 37, 41, 53, 61, 73] ['<a href="http://oeis.org/A002144">A002144</a>', '<a href="http://oeis.org/A002313">A002313</a>'] -7 (1, 1, 2) [1, 2, 4, 7, 8, 9, 11, 14, 16, 18] ['<a href="http://oeis.org/A028951">A028951</a>', '<a href="http://oeis.org/A035248">A035248</a>'] -7 (1, 1, 2) [2, 7, 11, 23, 29, 37, 43, 53, 67, 71] ['<a href="http://oeis.org/A033207">A033207</a>', '<a href="http://oeis.org/A045373">A045373</a>'] -8 (1, 0, 2) [1, 2, 3, 4, 6, 8, 9, 11, 12, 16] ['<a href="http://oeis.org/A002479">A002479</a>'] -8 (1, 0, 2) [2, 3, 11, 17, 19, 41, 43, 59, 67, 73] ['<a href="http://oeis.org/A033200">A033200</a>', '<a href="http://oeis.org/A033203">A033203</a>'] -11 (1, 1, 3) [1, 3, 4, 5, 9, 11, 12, 15, 16, 20] ['<a href="http://oeis.org/A028954">A028954</a>', '<a href="http://oeis.org/A035247">A035247</a>'] -11 (1, 1, 3) [3, 5, 11, 23, 31, 37, 47, 53, 59, 67] ['<a href="http://oeis.org/A056874">A056874</a>'] -12 (1, 0, 3) [1, 3, 4, 7, 9, 12, 13, 16, 19, 21] ['<a href="http://oeis.org/A003136">A003136</a>', '<a href="http://oeis.org/A034022">A034022</a>'] -12 (1, 0, 3) [3, 7, 13, 19, 31, 37, 43, 61, 67, 73] ['<a href="http://oeis.org/A002476">A002476</a>', '<a href="http://oeis.org/A007645">A007645</a>'] -15 (1, 1, 4) [1, 4, 6, 9, 10, 15, 16, 19, 24, 25] ['<a href="http://oeis.org/A028957">A028957</a>'] -15 (1, 1, 4) [19, 31, 61, 79, 109, 139, 151, 181, 199] ['<a href="http://oeis.org/A033212">A033212</a>', '<a href="http://oeis.org/A141184">A141184</a>'] -16 (1, 0, 4) [1, 4, 5, 8, 9, 13, 16, 17, 20, 25] ['<a href="http://oeis.org/A020668">A020668</a>'] -16 (1, 0, 4) [5, 13, 17, 29, 37, 41, 53, 61, 73, 89] ['<a href="http://oeis.org/A002144">A002144</a>', '<a href="http://oeis.org/A002313">A002313</a>'] -19 (1, 1, 5) [1, 4, 5, 7, 9, 11, 16, 17, 19, 20] ['<a href="http://oeis.org/A035243">A035243</a>'] -19 (1, 1, 5) [5, 7, 11, 17, 19, 23, 43, 47, 61, 73] ['<a href="http://oeis.org/A106863">A106863</a>'] -20 (1, 0, 5) [1, 4, 5, 6, 9, 14, 16, 20, 21, 24] ['<a href="http://oeis.org/A020669">A020669</a>'] -20 (1, 0, 5) [5, 29, 41, 61, 89, 101, 109, 149, 181] ['<a href="http://oeis.org/A033205">A033205</a>', '<a href="http://oeis.org/A216815">A216815</a>'] -23 (1, 1, 6) [1, 4, 6, 8, 9, 12, 16, 18, 23, 24] ['<a href="http://oeis.org/A028958">A028958</a>'] -23 (1, 1, 6) [23, 59, 101, 167, 173, 211, 223, 271] ['<a href="http://oeis.org/A033217">A033217</a>'] -24 (1, 0, 6) [1, 4, 6, 7, 9, 10, 15, 16, 22, 24] ['<a href="http://oeis.org/A002481">A002481</a>'] -24 (1, 0, 6) [7, 31, 73, 79, 97, 103, 127, 151, 193] ['<a href="http://oeis.org/A033199">A033199</a>'] -27 (1, 1, 7) [1, 4, 7, 9, 13, 16, 19, 25, 27, 28] ['<a href="http://oeis.org/A243175">A243175</a>'] -27 (1, 1, 7) [7, 13, 19, 31, 37, 43, 61, 67, 73, 79] ['<a href="http://oeis.org/A002476">A002476</a>', '<a href="http://oeis.org/A007645">A007645</a>'] -28 (1, 0, 7) [1, 4, 7, 8, 9, 11, 16, 23, 25, 28] ['<a href="http://oeis.org/A020670">A020670</a>'] -28 (1, 0, 7) [7, 11, 23, 29, 37, 43, 53, 67, 71, 79] ['<a href="http://oeis.org/A033207">A033207</a>', '<a href="http://oeis.org/A045373">A045373</a>'] -31 (1, 1, 8) [1, 4, 8, 9, 10, 14, 16, 20, 25, 28] ['<a href="http://oeis.org/A243176">A243176</a>'] -31 (1, 1, 8) [31, 47, 67, 131, 149, 173, 227, 283] ['<a href="http://oeis.org/A033221">A033221</a>'] -32 (1, 0, 8) [1, 4, 8, 9, 12, 16, 17, 24, 25, 32] ['<a href="http://oeis.org/A020671">A020671</a>'] -32 (1, 0, 8) [17, 41, 73, 89, 97, 113, 137, 193, 233] ['<a href="http://oeis.org/A007519">A007519</a>', '<a href="http://oeis.org/A045390">A045390</a>'] -35 (1, 1, 9) [1, 4, 9, 11, 15, 16, 21, 25, 29, 35] ['<a href="http://oeis.org/A243178">A243178</a>'] -35 (1, 1, 9) [11, 29, 71, 79, 109, 149, 151, 179, 191] ['<a href="http://oeis.org/A106881">A106881</a>'] -36 (1, 0, 9) [1, 4, 9, 10, 13, 16, 18, 25, 34, 36] ['<a href="http://oeis.org/A020672">A020672</a>'] -36 (1, 0, 9) [13, 37, 61, 73, 97, 109, 157, 181, 193] ['<a href="http://oeis.org/A068228">A068228</a>', '<a href="http://oeis.org/A141122">A141122</a>'] -39 (1, 1, 10) [1, 4, 9, 10, 12, 16, 22, 25, 30, 36] ['<a href="http://oeis.org/A243194">A243194</a>'] -39 (1, 1, 10) [43, 103, 139, 157, 181, 277, 367, 439] ['<a href="http://oeis.org/A033227">A033227</a>'] -40 (1, 0, 10) [1, 4, 9, 10, 11, 14, 16, 19, 25, 26] ['<a href="http://oeis.org/A020673">A020673</a>'] -40 (1, 0, 10) [11, 19, 41, 59, 89, 131, 139, 179, 211] ['<a href="http://oeis.org/A033201">A033201</a>'] -43 (1, 1, 11) [1, 4, 9, 11, 13, 16, 17, 23, 25, 31] ['<a href="http://oeis.org/A035233">A035233</a>'] -43 (1, 1, 11) [11, 13, 17, 23, 31, 41, 43, 47, 53, 59] ['<a href="http://oeis.org/A106891">A106891</a>'] -44 (1, 0, 11) [1, 4, 9, 11, 12, 15, 16, 20, 25, 27] ['<a href="http://oeis.org/A243651">A243651</a>'] -44 (1, 0, 11) [11, 47, 53, 103, 163, 199, 257, 269] ['<a href="http://oeis.org/A033209">A033209</a>', '<a href="http://oeis.org/A106279">A106279</a>'] -47 (1, 1, 12) [1, 4, 9, 12, 14, 16, 18, 24, 25, 32] ['<a href="http://oeis.org/A243650">A243650</a>'] -47 (1, 1, 12) [47, 83, 191, 197, 269, 439, 487, 523] ['<a href="http://oeis.org/A033232">A033232</a>'] -48 (1, 0, 12) [1, 4, 9, 12, 13, 16, 21, 25, 28, 36] [] -48 (1, 0, 12) [13, 37, 61, 73, 97, 109, 157, 181, 193] ['<a href="http://oeis.org/A068228">A068228</a>', '<a href="http://oeis.org/A141122">A141122</a>'] -51 (1, 1, 13) [1, 4, 9, 13, 15, 16, 19, 25, 33, 36] [] -51 (1, 1, 13) [13, 19, 43, 67, 103, 127, 151, 157] ['<a href="http://oeis.org/A106904">A106904</a>'] -52 (1, 0, 13) [1, 4, 9, 13, 14, 16, 17, 22, 25, 29] [] -52 (1, 0, 13) [13, 17, 29, 53, 61, 101, 113, 157, 173] ['<a href="http://oeis.org/A033210">A033210</a>'] -55 (1, 1, 14) [1, 4, 9, 14, 16, 20, 25, 26, 34, 36] [] -55 (1, 1, 14) [59, 71, 199, 229, 251, 269, 311, 379] ['<a href="http://oeis.org/A033235">A033235</a>'] -56 (1, 0, 14) [1, 4, 9, 14, 15, 16, 18, 23, 25, 30] [] -56 (1, 0, 14) [23, 127, 137, 151, 233, 239, 281, 359] ['<a href="http://oeis.org/A033211">A033211</a>'] -59 (1, 1, 15) [1, 4, 9, 15, 16, 17, 21, 25, 27, 35] [] -59 (1, 1, 15) [17, 59, 71, 139, 163, 197, 223, 317] ['<a href="http://oeis.org/A106922">A106922</a>'] -60 (1, 0, 15) [1, 4, 9, 15, 16, 19, 24, 25, 31, 36] ['<a href="http://oeis.org/A243173">A243173</a>'] -60 (1, 0, 15) [19, 31, 61, 79, 109, 139, 151, 181] ['<a href="http://oeis.org/A033212">A033212</a>', '<a href="http://oeis.org/A141184">A141184</a>'] -63 (1, 1, 16) [1, 4, 9, 16, 18, 22, 25, 28, 36, 46] [] -63 (1, 1, 16) [67, 79, 127, 163, 277, 373, 421, 463] ['<a href="http://oeis.org/A106930">A106930</a>'] -64 (1, 0, 16) [1, 4, 9, 16, 17, 20, 25, 32, 36, 41] [] -64 (1, 0, 16) [17, 41, 73, 89, 97, 113, 137, 193, 233] ['<a href="http://oeis.org/A007519">A007519</a>', '<a href="http://oeis.org/A045390">A045390</a>'] -67 (1, 1, 17) [1, 4, 9, 16, 17, 19, 23, 25, 29, 36] [] -67 (1, 1, 17) [17, 19, 23, 29, 37, 47, 59, 67, 71, 73] ['<a href="http://oeis.org/A106933">A106933</a>'] -68 (1, 0, 17) [1, 4, 9, 16, 17, 18, 21, 25, 26, 33] [] -68 (1, 0, 17) [17, 53, 149, 157, 281, 293, 349, 353] ['<a href="http://oeis.org/A033213">A033213</a>'] -71 (1, 1, 18) [1, 4, 9, 16, 18, 20, 24, 25, 30, 36] [] -71 (1, 1, 18) [71, 107, 293, 509, 643, 647, 739, 971] ['<a href="http://oeis.org/A033246">A033246</a>'] -72 (1, 0, 18) [1, 4, 9, 16, 18, 19, 22, 25, 27, 34] [] -72 (1, 0, 18) [19, 43, 67, 73, 97, 139, 163, 193, 211] ['<a href="http://oeis.org/A106950">A106950</a>', '<a href="http://oeis.org/A141170">A141170</a>'] -75 (1, 1, 19) [1, 4, 9, 16, 19, 21, 25, 31, 36, 39] [] -75 (1, 1, 19) [19, 31, 61, 79, 109, 139, 151, 181] ['<a href="http://oeis.org/A033212">A033212</a>', '<a href="http://oeis.org/A141184">A141184</a>'] -76 (1, 0, 19) [1, 4, 9, 16, 19, 20, 23, 25, 28, 35] [] -76 (1, 0, 19) [19, 23, 83, 101, 157, 163, 197, 271] ['<a href="http://oeis.org/A033214">A033214</a>'] -79 (1, 1, 20) [1, 4, 9, 16, 20, 22, 25, 26, 32, 36] [] -79 (1, 1, 20) [79, 83, 179, 223, 317, 397, 479, 541] ['<a href="http://oeis.org/A033251">A033251</a>'] -80 (1, 0, 20) [1, 4, 9, 16, 20, 21, 24, 25, 29, 36] [] -80 (1, 0, 20) [29, 89, 101, 181, 229, 349, 401, 461] ['<a href="http://oeis.org/A047650">A047650</a>'] -83 (1, 1, 21) [1, 4, 9, 16, 21, 23, 25, 27, 33, 36] [] -83 (1, 1, 21) [23, 41, 83, 131, 193, 199, 227, 229] ['<a href="http://oeis.org/A106970">A106970</a>'] -84 (1, 0, 21) [1, 4, 9, 16, 21, 22, 25, 30, 36, 37] [] -84 (1, 0, 21) [37, 109, 193, 277, 337, 373, 421, 457] ['<a href="http://oeis.org/A033215">A033215</a>'] -87 (1, 1, 22) [1, 4, 9, 16, 22, 24, 25, 28, 34, 36] [] -87 (1, 1, 22) [103, 151, 283, 349, 373, 397, 487, 571] ['<a href="http://oeis.org/A033256">A033256</a>'] -88 (1, 0, 22) [1, 4, 9, 16, 22, 23, 25, 26, 31, 36] [] -88 (1, 0, 22) [23, 31, 47, 71, 89, 97, 103, 113, 137] ['<a href="http://oeis.org/A033216">A033216</a>'] -91 (1, 1, 23) [1, 4, 9, 16, 23, 25, 29, 35, 36, 43] [] -91 (1, 1, 23) [23, 29, 43, 53, 79, 107, 113, 127, 179] ['<a href="http://oeis.org/A106988">A106988</a>', '<a href="http://oeis.org/A106989">A106989</a>'] -92 (1, 0, 23) [1, 4, 9, 16, 23, 24, 25, 27, 32, 36] [] -92 (1, 0, 23) [23, 59, 101, 167, 173, 211, 223, 271] ['<a href="http://oeis.org/A033217">A033217</a>'] -95 (1, 1, 24) [1, 4, 9, 16, 24, 25, 26, 30, 36, 44] [] -95 (1, 1, 24) [131, 239, 389, 419, 461, 821, 859, 919] ['<a href="http://oeis.org/A033206">A033206</a>'] -96 (1, 0, 24) [1, 4, 9, 16, 24, 25, 28, 33, 36, 40] [] -96 (1, 0, 24) [73, 97, 193, 241, 313, 337, 409, 433] ['<a href="http://oeis.org/A107008">A107008</a>', '<a href="http://oeis.org/A141375">A141375</a>'] -99 (1, 1, 25) [1, 4, 9, 16, 25, 27, 31, 36, 37, 45] [] -99 (1, 1, 25) [31, 37, 67, 97, 103, 157, 163, 181] ['<a href="http://oeis.org/A107013">A107013</a>', '<a href="http://oeis.org/A141177">A141177</a>'] -100 (1, 0, 25) [1, 4, 9, 16, 25, 26, 29, 34, 36] [] -100 (1, 0, 25) [29, 41, 61, 89, 101, 109, 149, 181] ['<a href="http://oeis.org/A033205">A033205</a>', '<a href="http://oeis.org/A216815">A216815</a>'] -103 (1, 1, 26) [1, 4, 9, 16, 25, 26, 28, 32, 36, 38] [] -103 (1, 1, 26) [103, 107, 139, 167, 359, 421, 461] [] -104 (1, 0, 26) [1, 4, 9, 16, 25, 26, 27, 30, 35, 36] [] -104 (1, 0, 26) [107, 113, 251, 283, 467, 523, 641] ['<a href="http://oeis.org/A033218">A033218</a>'] -107 (1, 1, 27) [1, 4, 9, 16, 25, 27, 29, 33, 36, 39] [] -107 (1, 1, 27) [29, 47, 83, 107, 137, 241, 251, 271] [] -108 (1, 0, 27) [1, 4, 9, 16, 25, 27, 28, 31, 36, 43] [] -108 (1, 0, 27) [31, 43, 109, 127, 157, 223, 229, 277] ['<a href="http://oeis.org/A014752">A014752</a>', '<a href="http://oeis.org/A016108">A016108</a>'] -111 (1, 1, 28) [1, 4, 9, 16, 25, 28, 30, 34, 36, 40] [] -111 (1, 1, 28) [127, 211, 307, 367, 613, 733, 787] [] -112 (1, 0, 28) [1, 4, 9, 16, 25, 28, 29, 32, 36, 37] [] -112 (1, 0, 28) [29, 37, 53, 109, 113, 137, 149, 193] ['<a href="http://oeis.org/A107134">A107134</a>', '<a href="http://oeis.org/A141172">A141172</a>'] -115 (1, 1, 29) [1, 4, 9, 16, 25, 29, 31, 35, 36] [] -115 (1, 1, 29) [29, 31, 41, 59, 71, 101, 131, 139] [] -116 (1, 0, 29) [1, 4, 9, 16, 25, 29, 30, 33, 36] [] -116 (1, 0, 29) [29, 173, 197, 277, 353, 457, 557, 661] ['<a href="http://oeis.org/A033219">A033219</a>'] -119 (1, 1, 30) [1, 4, 9, 16, 25, 30, 32, 36, 42] [] -119 (1, 1, 30) [263, 443, 557, 701, 1019, 1087, 1171] [] -120 (1, 0, 30) [1, 4, 9, 16, 25, 30, 31, 34, 36] [] -120 (1, 0, 30) [31, 79, 151, 199, 241, 271, 409, 439] ['<a href="http://oeis.org/A033220">A033220</a>'] -123 (1, 1, 31) [1, 4, 9, 16, 25, 31, 33, 36, 37] [] -123 (1, 1, 31) [31, 37, 43, 61, 73, 103, 127, 139] [] -124 (1, 0, 31) [1, 4, 9, 16, 25, 31, 32, 35, 36] [] -124 (1, 0, 31) [31, 47, 67, 131, 149, 173, 227, 283] ['<a href="http://oeis.org/A033221">A033221</a>'] -127 (1, 1, 32) [1, 4, 9, 16, 25, 32, 34, 36, 38, 44] [] -127 (1, 1, 32) [127, 131, 163, 191, 227, 271, 383] [] -128 (1, 0, 32) [1, 4, 9, 16, 25, 32, 33, 36, 41] [] -128 (1, 0, 32) [41, 113, 137, 257, 313, 337, 353, 409] ['<a href="http://oeis.org/A105389">A105389</a>'] -131 (1, 1, 33) [1, 4, 9, 16, 25, 33, 35, 36, 39] [] -131 (1, 1, 33) [53, 89, 131, 167, 307, 337, 367, 601] [] -132 (1, 0, 33) [1, 4, 9, 16, 25, 33, 34, 36, 37] [] -132 (1, 0, 33) [37, 97, 157, 181, 229, 313, 397, 421] ['<a href="http://oeis.org/A033222">A033222</a>'] -135 (1, 1, 34) [1, 4, 9, 16, 25, 34, 36, 40, 46] [] -135 (1, 1, 34) [139, 151, 199, 331, 541, 619, 661] ['<a href="http://oeis.org/A047652">A047652</a>'] -136 (1, 0, 34) [1, 4, 9, 16, 25, 34, 35, 36, 38] [] -136 (1, 0, 34) [43, 59, 83, 137, 257, 307, 331, 563] ['<a href="http://oeis.org/A033223">A033223</a>'] -139 (1, 1, 35) [1, 4, 9, 16, 25, 35, 36, 37, 41] [] -139 (1, 1, 35) [37, 41, 47, 107, 139, 167, 191, 239] [] -140 (1, 0, 35) [1, 4, 9, 16, 25, 35, 36, 39, 44] [] -140 (1, 0, 35) [71, 149, 179, 331, 359, 379, 569, 571] ['<a href="http://oeis.org/A033224">A033224</a>'] -143 (1, 1, 36) [1, 4, 9, 16, 25, 36, 38, 42, 48] [] -143 (1, 1, 36) [179, 467, 653, 719, 797, 1013, 1291] [] -144 (1, 0, 36) [1, 4, 9, 16, 25, 36, 37, 40, 45] [] -144 (1, 0, 36) [37, 61, 157, 193, 313, 349, 373, 397] ['<a href="http://oeis.org/A107142">A107142</a>'] -147 (1, 1, 37) [1, 4, 9, 16, 25, 36, 37, 39, 43] [] -147 (1, 1, 37) [37, 43, 67, 79, 109, 127, 151, 163] ['<a href="http://oeis.org/A139492">A139492</a>', '<a href="http://oeis.org/A141159">A141159</a>'] -148 (1, 0, 37) [1, 4, 9, 16, 25, 36, 37, 38, 41] [] -148 (1, 0, 37) [37, 41, 53, 73, 101, 137, 149, 157] ['<a href="http://oeis.org/A033225">A033225</a>'] -151 (1, 1, 38) [1, 4, 9, 16, 25, 36, 38, 40, 44] [] -151 (1, 1, 38) [151, 167, 251, 347, 613, 653, 727] [] -152 (1, 0, 38) [1, 4, 9, 16, 25, 36, 38, 39, 42] [] -152 (1, 0, 38) [47, 233, 263, 367, 463, 479, 593, 617] ['<a href="http://oeis.org/A033226">A033226</a>'] -155 (1, 1, 39) [1, 4, 9, 16, 25, 36, 39, 41, 45] [] -155 (1, 1, 39) [41, 59, 149, 191, 311, 349, 379, 419] [] -156 (1, 0, 39) [1, 4, 9, 16, 25, 36, 39, 40, 43] [] -156 (1, 0, 39) [43, 103, 139, 157, 181, 277, 367, 439] ['<a href="http://oeis.org/A033227">A033227</a>'] -159 (1, 1, 40) [1, 4, 9, 16, 25, 36, 40, 42, 46] [] -159 (1, 1, 40) [163, 223, 643, 661, 757, 997, 1447] [] -160 (1, 0, 40) [1, 4, 9, 16, 25, 36, 40, 41, 44] [] -160 (1, 0, 40) [41, 89, 241, 281, 401, 409, 449, 521] ['<a href="http://oeis.org/A107145">A107145</a>'] -163 (1, 1, 41) [1, 4, 9, 16, 25, 36, 41, 43, 47] [] -163 (1, 1, 41) [41, 43, 47, 53, 61, 71, 83, 97, 113] [] -164 (1, 0, 41) [1, 4, 9, 16, 25, 36, 41, 42, 45] [] -164 (1, 0, 41) [41, 173, 373, 389, 433, 617, 769, 853] ['<a href="http://oeis.org/A033228">A033228</a>'] -167 (1, 1, 42) [1, 4, 9, 16, 25, 36, 42, 44, 48] [] -167 (1, 1, 42) [167, 311, 491, 677, 743, 1109, 1567] [] -168 (1, 0, 42) [1, 4, 9, 16, 25, 36, 42, 43, 46] [] -168 (1, 0, 42) [43, 67, 163, 193, 211, 331, 337, 379] ['<a href="http://oeis.org/A033229">A033229</a>'] -171 (1, 1, 43) [1, 4, 9, 16, 25, 36, 43, 45, 49] [] -171 (1, 1, 43) [43, 73, 199, 271, 283, 349, 367, 397] [] -172 (1, 0, 43) [1, 4, 9, 16, 25, 36, 43, 44, 47, 49] [] -172 (1, 0, 43) [43, 47, 59, 79, 107, 173, 181, 197] ['<a href="http://oeis.org/A033230">A033230</a>'] -175 (1, 1, 44) [1, 4, 9, 16, 25, 36, 44, 46, 49, 50] [] -175 (1, 1, 44) [179, 191, 211, 239, 431, 499, 659] [] -176 (1, 0, 44) [1, 4, 9, 16, 25, 36, 44, 45, 48] [] -176 (1, 0, 44) [53, 257, 269, 397, 401, 421, 617, 757] ['<a href="http://oeis.org/A107150">A107150</a>'] -179 (1, 1, 45) [1, 4, 9, 16, 25, 36, 45, 47, 49, 51] [] -179 (1, 1, 45) [47, 101, 179, 227, 317, 409, 433, 503] [] -180 (1, 0, 45) [1, 4, 9, 16, 25, 36, 45, 46, 49, 54] [] -180 (1, 0, 45) [61, 109, 181, 229, 241, 349, 409, 421] ['<a href="http://oeis.org/A107152">A107152</a>', '<a href="http://oeis.org/A141301">A141301</a>'] -183 (1, 1, 46) [1, 4, 9, 16, 25, 36, 46, 48, 49, 52] [] -183 (1, 1, 46) [199, 283, 379, 439, 733, 757, 853, 859][] -184 (1, 0, 46) [1, 4, 9, 16, 25, 36, 46, 47, 49, 50] [] -184 (1, 0, 46) [47, 71, 127, 167, 193, 233, 271, 353] ['<a href="http://oeis.org/A033231">A033231</a>'] -187 (1, 1, 47) [1, 4, 9, 16, 25, 36, 47, 49, 53, 59] [] -187 (1, 1, 47) [47, 53, 59, 67, 89, 103, 137, 157, 179][] -188 (1, 0, 47) [1, 4, 9, 16, 25, 36, 47, 48, 49, 51] [] -188 (1, 0, 47) [47, 83, 191, 197, 269, 439, 487, 523] ['<a href="http://oeis.org/A033232">A033232</a>'] -191 (1, 1, 48) [1, 4, 9, 16, 25, 36, 48, 49, 50, 54] [] -191 (1, 1, 48) [191, 227, 773, 1091, 1487, 1493, 1723] [] -192 (1, 0, 48) [1, 4, 9, 16, 25, 36, 48, 49, 52, 57] [] -192 (1, 0, 48) [73, 97, 193, 241, 313, 337, 409, 433] ['<a href="http://oeis.org/A107008">A107008</a>', '<a href="http://oeis.org/A141375">A141375</a>'] -195 (1, 1, 49) [1, 4, 9, 16, 25, 36, 49, 51, 55, 61] [] -195 (1, 1, 49) [61, 79, 139, 181, 199, 211, 439, 571] [] -196 (1, 0, 49) [1, 4, 9, 16, 25, 36, 49, 50, 53, 58] [] -196 (1, 0, 49) [53, 113, 149, 193, 197, 277, 317, 373] ['<a href="http://oeis.org/A107155">A107155</a>'] -199 (1, 1, 50) [1, 4, 9, 16, 25, 36, 49, 50, 52, 56] [] -199 (1, 1, 50) [199, 263, 523, 599, 683, 797, 821, 877][] -200 (1, 0, 50) [1, 4, 9, 16, 25, 36, 49, 50, 51, 54] [] -200 (1, 0, 50) [59, 131, 281, 491, 499, 571, 619, 641] ['<a href="http://oeis.org/A107157">A107157</a>'] </pre> <p>listPosDefQF(6, 'primitively')</p> <pre> -3 (1, 1, 1) [1, 3, 7, 13, 19, 21, 31, 37, 39, 43, 49] [<a href="http://oeis.org/A034017">A034017</a>] -4 (1, 0, 1) [1, 2, 5, 10, 13, 17, 25, 26, 29, 34, 37] [<a href="http://oeis.org/A008784">A008784</a>, <a href="http://oeis.org/A037942">A037942</a>] -7 (1, 1, 2) [1, 2, 4, 7, 8, 11, 14, 16, 22, 23, 28] [<a href="http://oeis.org/A244779">A244779</a>] -8 (1, 0, 2) [1, 2, 3, 6, 9, 11, 17, 18, 19, 22, 27] [<a href="http://oeis.org/A057127">A057127</a>] -11 (1, 1, 3) [1, 3, 5, 9, 11, 15, 23, 25, 27, 31, 33] [<a href="http://oeis.org/A244780">A244780</a>] -12 (1, 0, 3) [1, 3, 4, 7, 12, 13, 19, 21, 28, 31, 37] [<a href="http://oeis.org/A244819">A244819</a>] </pre> <h2 style="color: maroon;"><span class="mw-headline" id="List_of_indefinite_quadratic_forms">List of indefinite quadratic forms</span></h2> <pre style="color:blue"> IQF = [(1,0,-1), (1, 1,-1), (1, 2,-1), (1,1,-2), (1, 2,-2), (1, 3,-1), (-1,2,3), (1,3,-2), (1, 4,-1), (1, 3,-3), (1, 4,-2), (-1, 3, 4), (1, 4,-3), (1, 5,-1), (1, 4,-4), (1, 5,-2), (-3, 0, 3), (1, 5,-3), (1, 6,-1), (1, 5,-4), (1, 6,-2), (1, 5,-5), (1, 6,-3), (-3, 1, 4), (1, 6,-4), (1, 7,-1), (1, 6,-5), (3,3,-4), (1,6,-6), (3,5,-3), (-4, 4, 3), (4,1,-4), (1,8,-3), (1,10,-9), (1,15,-1)] def listIndefiniteQF(): for q in IQF: lookup_OEIS(q, 'all') lookup_OEIS(q, 'primitively') lookup_OEIS(q, 'prime') listIndefiniteQF() </pre> <p>The call listIndefiniteQF() produces the list below:</p> <pre> 4 (1, 0, -1) [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37] ['<a href="http://oeis.org/A000040">A000040</a>', '<a href="http://oeis.org/A006005">A006005</a>'] 4 (1, 0, -1) [1, 3, 5, 7, 8, 9, 11, 13, 15, 16, 17] ['<a href="http://oeis.org/A047486">A047486</a>', '<a href="http://oeis.org/A229838">A229838</a>'] 4 (1, 0, -1) [1, 3, 4, 5, 7, 8, 9, 11, 12, 13, 15] ['<a href="http://oeis.org/A042965">A042965</a>', '<a href="http://oeis.org/A074227">A074227</a>'] 5 (1, 1, -1) [5, 11, 19, 29, 31, 41, 59, 61, 71, 79] ['<a href="http://oeis.org/A038872">A038872</a>', '<a href="http://oeis.org/A045468">A045468</a>'] 5 (1, 1, -1) [1, 5, 11, 19, 29, 31, 41, 55, 59, 61, 71]['<a href="http://oeis.org/A089270">A089270</a>'] 5 (1, 1, -1) [1, 4, 5, 9, 11, 16, 19, 20, 25, 29, 31] ['<a href="http://oeis.org/A031363">A031363</a>'] 8 (1, 2, -1) [2, 7, 17, 23, 31, 41, 47, 71, 73, 79, 89]['<a href="http://oeis.org/A001132">A001132</a>', '<a href="http://oeis.org/A038873">A038873</a>'] 8 (1, 2, -1) [1, 2, 7, 14, 17, 23, 31, 34, 41, 46, 47] ['<a href="http://oeis.org/A057126">A057126</a>'] 8 (1, 2, -1) [1, 2, 4, 7, 8, 9, 14, 16, 17, 18, 23] ['<a href="http://oeis.org/A035251">A035251</a>'] 9 (1, 1, -2) [7, 13, 19, 31, 37, 43, 61, 67, 73, 79] ['<a href="http://oeis.org/A002476">A002476</a>', '<a href="http://oeis.org/A007645">A007645</a>'] 9 (1, 1, -2) [1, 4, 7, 10, 13, 16, 18, 19, 22, 25, 27] [] 9 (1, 1, -2) [1, 4, 7, 9, 10, 13, 16, 18, 19, 22, 25] ['<a href="http://oeis.org/A056991">A056991</a>', '<a href="http://oeis.org/A242660">A242660</a>'] 12 (1, 2, -2) [13, 37, 61, 73, 97, 109, 157, 181, 193] ['<a href="http://oeis.org/A068228">A068228</a>', '<a href="http://oeis.org/A141122">A141122</a>'] 12 (1, 2, -2) [1, 6, 13, 22, 33, 37, 46, 61, 69, 73, 78]['<a href="http://oeis.org/A243655">A243655</a>'] 12 (1, 2, -2) [1, 4, 6, 9, 13, 16, 22, 24, 25, 33, 36] ['<a href="http://oeis.org/A084916">A084916</a>'] 13 (1, 3, -1) [3, 13, 17, 23, 29, 43, 53, 61, 79, 101] ['<a href="http://oeis.org/A038883">A038883</a>', '<a href="http://oeis.org/A141188">A141188</a>'] 13 (1, 3, -1) [1, 3, 9, 13, 17, 23, 27, 29, 39, 43, 51] ['<a href="http://oeis.org/A243656">A243656</a>'] 13 (1, 3, -1) [1, 3, 4, 9, 12, 13, 16, 17, 23, 25, 27] ['<a href="http://oeis.org/A035256">A035256</a>'] 16 (-1, 2, 3) [3, 7, 11, 19, 23, 31, 43, 47, 59, 67, 71]['<a href="http://oeis.org/A002145">A002145</a>', '<a href="http://oeis.org/A045326">A045326</a>'] 16 (-1, 2, 3) [3, 4, 7, 11, 15, 19, 20, 23, 27, 31, 32] [] 16 (-1, 2, 3) [3, 4, 7, 11, 12, 15, 16, 19, 20, 23, 27] [] 17 (1, 3, -2) [2, 13, 17, 19, 43, 47, 53, 59, 67, 83] ['<a href="http://oeis.org/A038889">A038889</a>'] 17 (1, 3, -2) [1, 2, 4, 8, 13, 16, 17, 19, 26, 32, 34] [] 17 (1, 3, -2) [1, 2, 4, 8, 9, 13, 16, 17, 18, 19, 25] ['<a href="http://oeis.org/A035258">A035258</a>'] 20 (1, 4, -1) [5, 11, 19, 29, 31, 41, 59, 61, 71, 79] ['<a href="http://oeis.org/A038872">A038872</a>', '<a href="http://oeis.org/A045468">A045468</a>'] 20 (1, 4, -1) [1, 4, 5, 11, 19, 20, 29, 31, 41, 44, 55] [] 20 (1, 4, -1) [1, 4, 5, 9, 11, 16, 19, 20, 25, 29, 31] ['<a href="http://oeis.org/A031363">A031363</a>'] 21 (1, 3, -3) [7, 37, 43, 67, 79, 109, 127, 151, 163 ] ['<a href="http://oeis.org/A139492">A139492</a>', '<a href="http://oeis.org/A141159">A141159</a>'] 21 (1, 3, -3) [1, 7, 15, 25, 37, 43, 51, 67, 79, 85] [] 21 (1, 3, -3) [1, 4, 7, 9, 15, 16, 25, 28, 36, 37, 43] ['<a href="http://oeis.org/A243172">A243172</a>'] 24 (1, 4, -2) [3, 19, 43, 67, 73, 97, 139, 163, 193] ['<a href="http://oeis.org/A106950">A106950</a>', '<a href="http://oeis.org/A141170">A141170</a>'] 24 (1, 4, -2) [1, 3, 10, 19, 25, 30, 43, 46, 57, 58] [] 24 (1, 4, -2) [1, 3, 4, 9, 10, 12, 16, 19, 25, 27, 30] ['<a href="http://oeis.org/A242661">A242661</a>'] 25 (-1, 3, 4) [19, 29, 59, 79, 89, 109, 139, 149, 179] ['<a href="http://oeis.org/A030433">A030433</a>', '<a href="http://oeis.org/A045457">A045457</a>'] 25 (-1, 3, 4) [4, 6, 9, 14, 19, 21, 24, 25, 26, 29, 34] [] 25 (-1, 3, 4) [4, 6, 9, 14, 16, 19, 21, 24, 25, 26, 29] [] 28 (1, 4, -3) [2, 29, 37, 53, 109, 113, 137, 149, 193] ['<a href="http://oeis.org/A107134">A107134</a>', '<a href="http://oeis.org/A141172">A141172</a>'] 28 (1, 4, -3) [1, 2, 9, 18, 21, 29, 37, 42, 53, 57, 58] [] 28 (1, 4, -3) [1, 2, 4, 8, 9, 16, 18, 21, 25, 29, 32] ['<a href="http://oeis.org/A242662">A242662</a>'] 29 (1, 5, -1) [5, 7, 13, 23, 29, 53, 59, 67, 71, 83] ['<a href="http://oeis.org/A038901">A038901</a>'] 29 (1, 5, -1) [1, 5, 7, 13, 23, 25, 29, 35, 49, 53, 59] [] 29 (1, 5, -1) [1, 4, 5, 7, 9, 13, 16, 20, 23, 25, 28] ['<a href="http://oeis.org/A035264">A035264</a>'] 32 (1, 4, -4) [17, 41, 73, 89, 97, 113, 137, 193, 233] ['<a href="http://oeis.org/A007519">A007519</a>', '<a href="http://oeis.org/A045390">A045390</a>'] 32 (1, 4, -4) [1, 8, 17, 28, 41, 49, 56, 73, 89, 92, 97][] 32 (1, 4, -4) [1, 4, 8, 9, 16, 17, 25, 28, 32, 36, 41] ['<a href="http://oeis.org/A242663">A242663</a>'] 33 (1, 5, -2) [3, 31, 37, 67, 97, 103, 157, 163, 181] ['<a href="http://oeis.org/A107013">A107013</a>', '<a href="http://oeis.org/A141177">A141177</a>'] 33 (1, 5, -2) [1, 3, 4, 12, 16, 22, 31, 34, 37, 48, 58] [] 33 (1, 5, -2) [1, 3, 4, 9, 12, 16, 22, 25, 27, 31, 34] ['<a href="http://oeis.org/A243185">A243185</a>'] 36 (-3, 0, 3) [3] [] 36 (-3, 0, 3) [3, 9, 15, 21, 24, 27, 33, 39, 45, 48, 51][] 36 (-3, 0, 3) [3, 9, 12, 15, 21, 24, 27, 33, 36, 39, 45]['<a href="http://oeis.org/A136290">A136290</a>'] 37 (1, 5, -3) [3, 7, 11, 37, 41, 47, 53, 67, 71, 73, 83]['<a href="http://oeis.org/A038913">A038913</a>', '<a href="http://oeis.org/A141178">A141178</a>'] 37 (1, 5, -3) [1, 3, 7, 9, 11, 21, 27, 33, 37, 41, 47] [] 37 (1, 5, -3) [1, 3, 4, 7, 9, 11, 12, 16, 21, 25, 27] ['<a href="http://oeis.org/A035267">A035267</a>'] 40 (1, 6, -1) [31, 41, 71, 79, 89, 151, 191, 199, 239] ['<a href="http://oeis.org/A141180">A141180</a>'] 40 (1, 6, -1) [1, 6, 9, 10, 15, 26, 31, 39, 41, 54, 65] [] 40 (1, 6, -1) [1, 4, 6, 9, 10, 15, 16, 24, 25, 26, 31] ['<a href="http://oeis.org/A242664">A242664</a>'] 41 (1, 5, -4) [2, 5, 23, 31, 37, 41, 43, 59, 61, 73, 83]['<a href="http://oeis.org/A038919">A038919</a>', '<a href="http://oeis.org/A141181">A141181</a>'] 41 (1, 5, -4) [1, 2, 4, 5, 8, 10, 16, 20, 23, 25, 31] [] 41 (1, 5, -4) [1, 2, 4, 5, 8, 9, 10, 16, 18, 20, 23] ['<a href="http://oeis.org/A035269">A035269</a>'] 44 (1, 6, -2) [5, 37, 53, 89, 97, 113, 137, 157, 181] ['<a href="http://oeis.org/A141182">A141182</a>'] 44 (1, 6, -2) [1, 5, 14, 22, 25, 37, 38, 49, 53, 70, 77][] 44 (1, 6, -2) [1, 4, 5, 9, 14, 16, 20, 22, 25, 36, 37] ['<a href="http://oeis.org/A243166">A243166</a>'] 45 (1, 5, -5) [19, 31, 61, 79, 109, 139, 151, 181, 199] ['<a href="http://oeis.org/A033212">A033212</a>', '<a href="http://oeis.org/A141184">A141184</a>'] 45 (1, 5, -5) [1, 9, 19, 31, 45, 55, 61, 79, 99, 109] [] 45 (1, 5, -5) [1, 4, 9, 16, 19, 25, 31, 36, 45, 49, 55] ['<a href="http://oeis.org/A243174">A243174</a>'] 48 (1, 6, -3) [13, 37, 61, 73, 97, 109, 157, 181, 193] ['<a href="http://oeis.org/A068228">A068228</a>', '<a href="http://oeis.org/A141122">A141122</a>'] 48 (1, 6, -3) [1, 4, 13, 24, 33, 37, 52, 61, 69, 73, 88][] 48 (1, 6, -3) [1, 4, 9, 13, 16, 24, 25, 33, 36, 37, 49] ['<a href="http://oeis.org/A243168">A243168</a>'] 49 (-3, 1, 4) [2, 11, 23, 37, 53, 67, 79, 107, 109, 137]['<a href="http://oeis.org/A045374">A045374</a>', '<a href="http://oeis.org/A045387">A045387</a>'] 49 (-3, 1, 4) [2, 4, 9, 11, 15, 16, 18, 22, 23, 25, 30] [] 49 (-3, 1, 4) [2, 4, 8, 9, 11, 15, 16, 18, 22, 23, 25] [] 52 (1, 6, -4) [3, 13, 17, 23, 29, 43, 53, 61, 79, 101] ['<a href="http://oeis.org/A038883">A038883</a>', '<a href="http://oeis.org/A141188">A141188</a>'] 52 (1, 6, -4) [1, 3, 4, 9, 12, 13, 17, 23, 27, 29, 36] [] 52 (1, 6, -4) [1, 3, 4, 9, 12, 13, 16, 17, 23, 25, 27] ['<a href="http://oeis.org/A035256">A035256</a>'] 53 (1, 7, -1) [7, 11, 13, 17, 29, 37, 43, 47, 53, 59] ['<a href="http://oeis.org/A038931">A038931</a>', '<a href="http://oeis.org/A141189">A141189</a>'] 53 (1, 7, -1) [1, 7, 11, 13, 17, 29, 37, 43, 47, 49, 53][] 53 (1, 7, -1) [1, 4, 7, 9, 11, 13, 16, 17, 25, 28, 29] ['<a href="http://oeis.org/A243191">A243191</a>'] 56 (1, 6, -5) [2, 11, 43, 67, 107, 113, 137, 163, 179] ['<a href="http://oeis.org/A141190">A141190</a>'] 56 (1, 6, -5) [1, 2, 11, 22, 25, 35, 43, 50, 65, 67, 70][] 56 (1, 6, -5) [1, 2, 4, 8, 9, 11, 16, 18, 22, 25, 32] ['<a href="http://oeis.org/A243186">A243186</a>'] 57 (3, 3, -4) [2, 3, 29, 41, 53, 59, 71, 89, 107, 113] ['<a href="http://oeis.org/A141192">A141192</a>'] 57 (3, 3, -4) [2, 3, 8, 12, 14, 21, 29, 32, 38, 41, 48] [] 57 (3, 3, -4) [1, 2, 3, 8, 12, 14, 18, 21, 27, 29, 32] ['<a href="http://oeis.org/A243192">A243192</a>'] 60 (1, 6, -6) [61, 109, 181, 229, 241, 349, 409, 421] ['<a href="http://oeis.org/A107152">A107152</a>', '<a href="http://oeis.org/A141301">A141301</a>'] 60 (1, 6, -6) [1, 10, 21, 34, 49, 61, 66, 85, 106, 109] [] 60 (1, 6, -6) [1, 4, 9, 10, 16, 21, 25, 34, 36, 40, 49] ['<a href="http://oeis.org/A243188">A243188</a>'] 61 (3, 5, -3) [3, 5, 13, 19, 41, 47, 61, 73, 83, 97] ['<a href="http://oeis.org/A038941">A038941</a>', '<a href="http://oeis.org/A141215">A141215</a>'] 61 (3, 5, -3) [1, 3, 5, 9, 13, 15, 19, 25, 27, 39, 41] [] 61 (3, 5, -3) [1, 3, 4, 5, 9, 12, 13, 15, 16, 19, 20] ['<a href="http://oeis.org/A243654">A243654</a>'] 64 (-4, 4, 3) [3, 11, 19, 43, 59, 67, 83, 107, 131, 139]['<a href="http://oeis.org/A007520">A007520</a>', '<a href="http://oeis.org/A045339">A045339</a>'] 64 (-4, 4, 3) [3, 11, 16, 19, 27, 28, 35, 43, 51, 59] [] 64 (-4, 4, 3) [3, 11, 12, 16, 19, 27, 28, 35, 43, 44] [] 65 (4, 1, -4) [29, 61, 79, 101, 131, 139, 179, 181, 191]['<a href="http://oeis.org/A141111">A141111</a>'] 65 (4, 1, -4) [1, 4, 10, 14, 16, 26, 29, 35, 40, 49, 56][] 65 (4, 1, -4) [1, 4, 9, 10, 14, 16, 25, 26, 29, 35, 36] ['<a href="http://oeis.org/A243170">A243170</a>'] 76 (1, 8, -3) [5, 17, 61, 73, 101, 137, 149, 157, 197] ['<a href="http://oeis.org/A142956">A142956</a>'] 76 (1, 8, -3) [1, 5, 6, 9, 17, 25, 30, 38, 45, 54, 57] [] 76 (1, 8, -3) [1, 4, 5, 6, 9, 16, 17, 20, 24, 25, 30] [] 136 (1, 10, -9) [2, 47, 89, 191, 223, 239, 271, 359] [] 136 (1, 10, -9) [1, 2, 15, 30, 33, 47, 55, 66, 81, 87] [] 136 (1, 10, -9) [1, 2, 4, 8, 9, 15, 16, 18, 25, 30, 32] [] 229 (1, 15, -1) [37, 53, 173, 193, 229, 241, 347, 359] ['<a href="http://oeis.org/A141166">A141166</a>'] 229 (1, 15, -1) [1, 15, 27, 33, 37, 45, 51, 53, 55, 57] [] 229 (1, 15, -1) [1, 4, 9, 15, 16, 25, 27, 33, 36, 37] [] </pre> <h2 style="color: maroon;"><span class="mw-headline" id="Number_of_represented_integers_below_N_as_a_function_of_the_discriminant">Number of represented integers below N as a function of the discriminant</span></h2> <p> Looking at the examples above the impression arises that the number of integers which are represented by a positive definite form decreases when the absolute value of the discriminant increases. The following numerical experiment confirms this. The clear upper bound in the plot below calls for an explanation. </p> <pre> def numberOfPosDefQF(n, belowOrEqual, filter = 'all'): F = posDefQF() L = [] for i in range(n): q = F.next() Q = binaryQF(q) rep = Q.represented_positives(belowOrEqual, filter, verbose = False) d = Q.discriminant() L.append((-d, len(rep))) return L print numberOfPosDefQF(10, 100) (3, 36), (4, 43), (7, 41), (8, 51), (11, 39), (12, 36), (15, 30), (16, 32), (19, 36), (20, 32)] </pre> <p>This might take a while:</p> <pre>A = numberOfPosDefQF(500, 10000) R = numberOfPosDefQF(500, 10000, 'primitively') P = numberOfPosDefQF(500, 10000, 'prime') </pre> <pre> allplot = list_plot(A[5::], color='blue', legend_label='all reps') primeplot = list_plot(P[5::], color='purple', legend_label='prime reps') combi = allplot + primeplot combi.axes_labels(['positive definite QF with discriminant -n',\ 'number of reps below 10000']) show(combi, title='Number of reps as a function of the discriminant.',\ frame=True, legend_loc="upper right") </pre> <center> <p><a href="/wiki/File:PosDefQFNumOfReps.png" class="image"><img alt="PosDefQFNumOfReps.png" src="/w/images/thumb/2/2d/PosDefQFNumOfReps.png/640px-PosDefQFNumOfReps.png" width="640" height="481" srcset="/w/images/2/2d/PosDefQFNumOfReps.png 1.5x" /></a> </p> </center> <p style="font-style:oblique">Please report bugs immediately to the author. Suggestions for improvements and extensions are welcome. </p> <h2 style="color: maroon;"><span class="mw-headline" id="References">References</span></h2> <ul> <li> Johannes Buchmann, Ulrich Vollmer: Binary Quadratic Forms, Springer, Berlin 2007. </li> <li>Pete L. Clark, Topics in Arithmetic Geometry II, Handout 3: <a rel="nofollow" class="external text" href="http://archive.wikiwix.com/cache/?url=http://math.uga.edu/~pete/8430notes3.pdf&title=%C2%AB%C2%A0Topics%20in%20Arithmetic%20Geometry%20II%2C%20Handout%203%3A%20Elementary%20Theory%20of%20Quadratic%20Forms%C2%A0%C2%BB">Elementary Theory of Quadratic Forms</a>. </li> <li>Henri Cohen, A Course in Computational Algebraic Number Theory, Springer 1993. </li> <li>Franz Lemmermeyer, <a rel="nofollow" class="external text" href="http://www.rzuser.uni-heidelberg.de/~hb3/publ/bf.pdf">Binary Quadratic Forms</a>, 2010. </li> <li> Andrew Sutherland, Introduction to Arithmetic Geometry, <a rel="nofollow" class="external text" href="http://ocw.mit.edu/courses/mathematics/18-782-introduction-to-arithmetic-geometry-fall-2013/lecture-notes/MIT18_782F13_lec9.pdf">Lecture 9: Quadratic forms</a>, MIT Open Course Ware, Fall 2013.   <span style="font-size: small; font-style: italic"> Of special interest is definition 9.7 and theorem 9.9. Sutherland writes: "The constraint that x!=0 is critical, otherwise every quadratic form would represent 0; the quadratic forms that represent 0 are of particular interest to us."</span> </li> <li> Elementary Number Theory – Section 3.2 <a rel="nofollow" class="external text" href="http://www.math.ntu.edu.tw/~hchu/Number/ElementaryNumberTheory%5B3-2%5D.pdf">Binary Quadratic Forms</a>. <br /> Elementary Number Theory – Section 3.3 <a rel="nofollow" class="external text" href="http://www.math.ntu.edu.tw/~hchu/Number/ElementaryNumberTheory%5B3-3%5D.pdf">Sums of two squares</a>. </li> </ul> <hr style="width:640px; background-color:maroon; height:8px; margin-right:0;margin-top:32px" /> <p>This is an <a rel="nofollow" class="external text" href="http://ipython.org/notebook.html">IPython Notebook</a> which was developed on <a rel="nofollow" class="external text" href="http://cloud.sagemath.com">SageMath Cloud</a>. SageMath Cloud is a free service with support from University of Washington, the National Science Foundation and Google. <a rel="nofollow" class="external text" href="http://www.sagemath.org/index.html">Sage</a> is a free open source alternative to Magma, Maple, Mathematica and Matlab. Get an account on SageMath Cloud, download this <a rel="nofollow" class="external text" href="http://www.luschny.de/math/seq/binaryqf/BinaryQF.ipynb">notebook</a>, upload it to SMC and start exploring!</p> </div> <!-- NewPP limit report Cached time: 20250223054328 Cache expiry: 86400 Dynamic content: false CPU time usage: 0.088 seconds Real time usage: 0.102 seconds Preprocessor visited node count: 125/1000000 Preprocessor generated node count: 532/1000000 Post‐expand include size: 0/2097152 bytes Template argument size: 0/2097152 bytes Highest expansion depth: 2/40 Expensive parser function count: 0/100 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 0.000 1 -total --> </div> <!-- Saved in parser cache with key wikidb:pcache:idhash:209692-0!canonical and timestamp 20250223054328 and revision id 1659479 --> </div><div class="printfooter"> Retrieved from "<a dir="ltr" href="https://oeis.org/w/index.php?title=User:Peter_Luschny/BinaryQuadraticForms&oldid=1659479">https://oeis.org/w/index.php?title=User:Peter_Luschny/BinaryQuadraticForms&oldid=1659479</a>"</div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> <!-- end content --> <div class="visualClear"></div> </div> </div> </div> <div id="column-one"> <h2>Navigation menu</h2> <div id="p-cactions" class="portlet" role="navigation"> <h3>Views</h3> <div class="pBody"> <ul> <li id="ca-nstab-user" class="selected"><a href="/wiki/User:Peter_Luschny/BinaryQuadraticForms" title="View the user page [c]" accesskey="c">User page</a></li> <li id="ca-talk" class="new"><a href="/w/index.php?title=User_talk:Peter_Luschny/BinaryQuadraticForms&action=edit&redlink=1" rel="discussion" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li> <li id="ca-viewsource"><a href="/w/index.php?title=User:Peter_Luschny/BinaryQuadraticForms&action=edit" title="This page is protected. You can view its source [e]" accesskey="e">View source</a></li> <li id="ca-history"><a href="/w/index.php?title=User:Peter_Luschny/BinaryQuadraticForms&action=history" title="Past revisions of this page [h]" accesskey="h">History</a></li> </ul> </div> </div> <div class="portlet" id="p-personal" role="navigation"> <h3>Personal tools</h3> <div class="pBody"> <ul> <li id="pt-login"><a href="/w/index.php?title=Special:UserLogin&returnto=User%3APeter+Luschny%2FBinaryQuadraticForms" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o">Log in</a></li> <li id="pt-createaccount"><a href="/wiki/Special:RequestAccount" title="You are encouraged to create an account and log in; however, it is not mandatory">Request account</a></li> </ul> </div> </div> <div class="portlet" id="p-logo" role="banner"> <a href="/wiki/Main_Page" class="mw-wiki-logo" title="Visit the main page"></a> </div> <div class="generated-sidebar portlet" id="p-navigation" role="navigation"> <h3>Navigation</h3> <div class="pBody"> <ul> <li id="n-OEIS"><a href="http://oeis.org/">OEIS</a></li> <li id="n-mainpage-description"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z">Wiki Main Page</a></li> <li id="n-portal"><a href="/wiki/OeisWiki:Community_portal" title="About the project, what you can do, where to find things">Community portal</a></li> <li id="n-status"><a href="/wiki/OeisWiki:System_Status">System Status</a></li> <li id="n-recentchanges"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li> <li id="n-randompage"><a href="/wiki/Special:Random" title="Load a random page [x]" accesskey="x">Random page</a></li> <li id="n-help"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents" title="The place to find out">Help</a></li> </ul> </div> </div> <div id="p-search" class="portlet" role="search"> <h3><label for="searchInput">Search</label></h3> <div id="searchBody" class="pBody"> <form action="/w/index.php" id="searchform"> <input type="hidden" name="title" value="Special:Search"/> <input type="search" name="search" placeholder="Search OeisWiki" title="Search OeisWiki [f]" accesskey="f" id="searchInput"/> <input type="submit" name="go" value="Go" title="Go to a page with this exact name if it exists" id="searchGoButton" class="searchButton"/> <div><a href="/wiki/Special:Search" rel="search">Advanced search</a></div> </form> </div> </div> <div class="portlet" id="p-tb" role="navigation"> <h3>Tools</h3> <div class="pBody"> <ul> <li id="t-whatlinkshere"><a href="/wiki/Special:WhatLinksHere/User:Peter_Luschny/BinaryQuadraticForms" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li> <li id="t-recentchangeslinked"><a href="/wiki/Special:RecentChangesLinked/User:Peter_Luschny/BinaryQuadraticForms" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li> <li id="t-contributions"><a href="/wiki/Special:Contributions/Peter_Luschny" title="A list of contributions by this user">User contributions</a></li> <li id="t-log"><a href="/wiki/Special:Log/Peter_Luschny">Logs</a></li> <li id="t-userrights"><a href="/wiki/Special:UserRights/Peter_Luschny">View user groups</a></li> <li id="t-specialpages"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q">Special pages</a></li> <li id="t-print"><a href="/w/index.php?title=User:Peter_Luschny/BinaryQuadraticForms&printable=yes" rel="alternate" title="Printable version of this page [p]" accesskey="p">Printable version</a></li> <li id="t-permalink"><a href="/w/index.php?title=User:Peter_Luschny/BinaryQuadraticForms&oldid=1659479" title="Permanent link to this revision of the page">Permanent link</a></li> <li id="t-info"><a href="/w/index.php?title=User:Peter_Luschny/BinaryQuadraticForms&action=info" title="More information about this page">Page information</a></li> </ul> </div> </div> </div><!-- end of the left (by default at least) column --> <div class="visualClear"></div> <div id="footer" role="contentinfo"> <div id="f-poweredbyico"> <a href="//www.mediawiki.org/"><img src="/w/resources/assets/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="/w/resources/assets/poweredby_mediawiki_132x47.png 1.5x, /w/resources/assets/poweredby_mediawiki_176x62.png 2x" width="88" height="31"/></a> </div> <ul id="f-list"> <li id="lastmod"> This page was last edited on 1 May 2024, at 13:38.</li> <li id="copyright">Content is available under <a href="/wiki/The_OEIS_End-User_License_Agreement" title="The OEIS End-User License Agreement">The OEIS End-User License Agreement</a> unless otherwise noted.</li> <li id="privacy"><a href="/wiki/OeisWiki:Privacy_policy" class="mw-redirect" title="OeisWiki:Privacy policy">License Agreements, Terms of Use, Privacy Policy</a></li> <li id="about"><a href="/wiki/OeisWiki:About" class="mw-redirect" title="OeisWiki:About">About OeisWiki</a></li> <li id="disclaimer"><a href="/wiki/OeisWiki:General_disclaimer" class="mw-redirect" title="OeisWiki:General disclaimer">Disclaimers</a></li> </ul> </div> </div> <script>(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.088","walltime":"0.102","ppvisitednodes":{"value":125,"limit":1000000},"ppgeneratednodes":{"value":532,"limit":1000000},"postexpandincludesize":{"value":0,"limit":2097152},"templateargumentsize":{"value":0,"limit":2097152},"expansiondepth":{"value":2,"limit":40},"expensivefunctioncount":{"value":0,"limit":100},"timingprofile":["100.00% 0.000 1 -total"]},"cachereport":{"timestamp":"20250223054328","ttl":86400,"transientcontent":false}}});});</script><script>(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgBackendResponseTime":367});});</script></body></html>