Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can call pari.qfbsolve directly with flag set to 1 or 3. Rephrasing examples from the PARI/GP manual:

sage: pari.qfbsolve(pari.Qfb(1,0,2), 603, 1)       # all primitive solutions
[[5, 17], [-19, -11], [19, -11], [5, -17]]

sage: pari.qfbsolve(pari.Qfb(1,0,2), 603, 3)       # all solutions
[[5, 17], [-19, -11], [19, -11], [5, -17], [-21, 9], [-21, -9]]

You can call pari.qfbsolve directly with flag set to 1 or 3. Rephrasing examples from the PARI/GP manual:

sage: pari.qfbsolve(pari.Qfb(1,0,2), 603, 1) 1).sage()       # all primitive solutions
[[5, 17], [-19, -11], [19, -11], [5, -17]]

sage: pari.qfbsolve(pari.Qfb(1,0,2), 603, 3) 3).sage()       # all solutions
[[5, 17], [-19, -11], [19, -11], [5, -17], [-21, 9], [-21, -9]]