# Quadratic diophantine equations and geometry of numbers

Let (for concreteness) $$a = 2$$, $$b = \sqrt{5}$$ and $$\varphi = (\sqrt{5}+1)/2$$. I am interested in solutions $$(w,x,y,z) \in \mathbb{Z}[\varphi]^4$$ of the system

$$w^2 - ax^2 -by^2 + abz^2 = 1$$ $$\lvert w^2 + ax^2 +by^2 + abz^2 \rvert \ll \infty$$ $$\lvert \bar{w}^2 + a\bar{x}^2 -b\bar{y}^2 - ab\bar{z}^2 \rvert \le C$$ for some constant $$C$$. Here $$\overline{\alpha + \beta\sqrt{5}} = \alpha - \beta\sqrt{5}$$ and $$\ll \infty$$'' means that ideally I would like to enumerate solutions in increasing order of this value. (Restriction of scalars turns this problem into a system of two quadratic equations and two inequalities in eight variables in $$\mathbb{Z}$$; if someone wants to see it, I can write it out including potential mistakes).

1. What is the best (or even any practical) way to produce these?

I am aware that there is a lot of classical mathematics associated to this question but I don't quite manage to put it together. Perhaps a subquestion is:

1. Can one enumerate the squares $$s$$ in $$\mathbb{Z}[\varphi]$$ with $$\lvert \bar{s} \rvert \le C$$ in increasing order of $$\lvert s \rvert$$?

Context: Let $$k = \mathbb{Q}(\varphi)$$ and let $$A$$ be the quaternion algebra $$(\frac{a,b}{k})$$ with norm $$\nu$$. With the above values the algebra $$A$$ is a skew field but tensoring with $$\mathbb{R}$$ in the two possible ways (taking $$\sqrt{5}$$ to $$\pm\sqrt{5}$$) gives an isomorphism with $$M_2(\mathbb{R})$$ which we equip with the map $$\left\lVert\left(\begin{array}{cc}\alpha&\beta\\\gamma&\delta\end{array}\right)\right\rVert = \frac{1}{2}\left(\alpha^2 + \beta^2 + \gamma^2 + \delta^2\right).$$ The above system then asks for solutions $$\lambda$$ in the maximal an order of $$A$$ for $$\nu(\lambda) = 1$$, $$\lVert\lambda\rVert_{\sqrt{5} \mapsto \sqrt{5}} \ll \infty$$ and $$\lVert \lambda \rVert_{\sqrt{5} \mapsto -\sqrt{5}} \le C$$.

• mathoverflow.net/questions/263153/… – individ May 29 '19 at 4:37
• @individ: I assume you rather mean mathoverflow.net/a/263240/5339. Still I would be grateful for some more detail. – Stefan Witzel May 31 '19 at 13:03
• One minor remark. You seem to ask for elements of $\mathbb{Z}[\varphi][i,j]$ where $i,j$ are the usual generators of your quaternion algebra. This order is not maximal. – Aurel Jun 2 '19 at 10:20
• @Aurel: thank you! I just assumed it was maximal. Maximality is not crucial but desirable for my application. Can you tell (or reference) me why it is not maximal and how to find a maximal one? – Stefan Witzel Jun 3 '19 at 8:00
• An order of the form $\mathbb{Z}_F[i,j]$ is never maximal, because its reduced discriminant is $(4ab)\mathbb{Z}_F$, whereas the reduced discriminant of a maximal order equals that of the algebra and is therefore squarefree. You can find more details in John Voight's book, and for methods to find maximal orders, see this question – Aurel Jun 3 '19 at 9:48

Here is a basic (but not optimal) method for doing this.

Given a lattice $$L$$, a positive definite quadratic form $$Q$$ on $$L$$ and a bound $$B$$, you can enumerate all the elements $$x\in L$$ with $$Q(x)\le B$$ using the Kannan--Fincke--Pohst algorithm, which is implemented in many computer algebra systems (e.g. Pari, Magma).

In your case, you can apply this to the order of interest to you, with the quadratic form given by the (possibly weighted) sum of the two quadratic forms at the two real places, and then select elements of reduced norm $$1$$.

It's more of a comment than an answer.

Make such a change.... $$x=X+q$$

$$w^2-ax^2-by^2+abz^2=1$$

$$w^2-aq^2+abz^2=by^2+aX^2+2aqX+1$$

If we use this difference as Pell's equation. $$w^2-aq^2=1$$

Equation. .. $$by^2+aX^2+2aX=abz^2$$

Always has decisions.... in General, an equation with any curves of triangular numbers always has a solution..... https://math.stackexchange.com/questions/794510/curves-triangular-numbers

• Thank you! The problem with generating solutions in such a successive fashion is that I don't see how I can be sure that I found all "small" solutions at a certain point. – Stefan Witzel Jun 3 '19 at 8:08