Search arXiv⌕ Search

arXiv · 2609.28649

Straight-line programs for the solutions of Pell's equation

Abstract

For nonsquare $d\ge 2$, we construct fixed straight-line programs for the least non-trivial solution $(X_1,Y_1)$ of $x^2-dy^2=1$, using addition, truncated subtraction, multiplication, integer division, exponentiation, and remainder. A geometric-sum identity recovers $(X_1,Y_1)$ from the coordinate sums of an initial segment of Pell solutions, without knowing how many solutions were summed. Weighted binary encodings make these sums accessible to arithmetic computation. Counting operations with reuse of computed values, one program uses $94$ operations, with intermediate bit lengths bounded by $2^{2^{2^{O(d)}}}$. Four additional operations give a $98$-operation program with the bound $2^{2^{O(d)}}$. Hua's bound gives corresponding programs with $103$ and $107$ operations and replaces $O(d)$ by $O(\sqrt d\log d)$ in these size bounds. Once the fundamental solution is known, generating-function formulas compute the $n$-th positive solution in $21$ further operations by extracting its coordinates as base-$b$ digits. We prove that $2X_1(X_1+1)-1$ is the least integer base for which both formulas are defined and correct for every $n\ge1$.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Bogdan Dumitru, Mihai Prunescu. 2026-09-23. Straight-line programs for the solutions of Pell's equation. https://arxiv.org/abs/2609.28649

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Documentation for the ratpoints program

This note explains how to obtain, install, and use the ratpoints program. The program finds rational points up to a specified height on hyperelliptic curves using a highly optimized quadratic sieving algorithm.

math.NT↗

Transfer operator for the Gauss' continued fraction map. I. Structure of the eigenvalues and trace formulas

Let L be the transfer operator associated with the Gauss' continued fraction map, known also as the Gauss-Kuzmin-Wirsing operator, acting on the Banach space. In this work we prove a two-term asymptotic formula for the eigenvalues of L, show their algebraic simplicity, sign alternation pattern, and decrease in absolute value. This settles, in a stronger form, the conjectures of D. Mayer and G. Roepstorff (1988), A.J. MacLeod (1992), Ph. Flajolet and B. Vallee (1995), also supported by several other authors. Further, we find an exact series for the eigenvalues, which also gives the canonical decomposition of trace formulas due to D. Mayer (1976) and K.I. Babenko (1978). This crystallizes the contribution of each individual eigenvalue in the trace formulas.

math.NT↗

Arithmetic Sparsity and Obstructions in Weighted Projective Spaces

Let $\mathbb{WP}^n_{\mathbf{q}}$ be a weighted projective space with weights $\mathbf{q} = (q_0, \dots, q_n)$, $q = \operatorname{lcm}(q_i)$, and let $ϕ\colon \mathbb{WP}^n_{\mathbf{q}} \to \mathbb{P}^n$, $[x_i] \mapsto [x_i^{q/q_i}]$, be the Veronese morphism. A point of $\mathbb{P}^n(\mathbb{Q})$ is the image of a rational point of $\mathbb{WP}^n_{\mathbf{q}}$ only if its valuation vector at every prime satisfies a Kummer congruence. We count the rational points of $\mathbb{WP}^n_{\mathbf{q}}$ of bounded weighted height $\mathfrak{h} = H(ϕ(\,\cdot\,))^{1/q}$ and prove that, on the locus where all coordinates are nonzero, $$ Z^{\circ}_{\mathfrak{h}}\big( \mathbb{WP}^n_{\mathbf{q}}(\mathbb{Q}), X \big) = X^{q\,a(\mathbf{q})} P_{\mathbf{q}}(\log X) + O\big( X^{q\,a(\mathbf{q}) - θ} \big), \qquad θ> 0, $$ with $P_{\mathbf{q}}$ of exact degree $β(\mathbf{q})$, where $a(\mathbf{q})$ and $β(\mathbf{q})$ are the value and the dimension of the optimal face of a linear program determined by the Kummer congruences. The exponent satisfies $Q \leq q\,a(\mathbf{q}) \leq q(n+1)$, $Q = \sum q_i$, with equality on the right if and only if the exponents $q/q_i$ are pairwise coprime; the difference $q(n+1) - q\,a(\mathbf{q})$ measures the sparsity of the rational points of $\mathbb{WP}^n_{\mathbf{q}}$ relative to those of its Veronese image. The leading constant is evaluated when the dual optimum is diagonal and for the weights $(2,2,3,3)$. The full counting function follows by stratification, and we formulate the conjecture over an arbitrary number field.

math.NT↗