Skip to content

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

Bogdan Dumitru, Mihai Prunescu

math.NT

Abstract

For nonsquare d≥2d\ge 2, we construct fixed straight-line programs for the least non-trivial solution (X1,Y1)(X_1,Y_1) of x2−dy2=1x^2-dy^2=1, using addition, truncated subtraction, multiplication, integer division, exponentiation, and remainder. A geometric-sum identity recovers (X1,Y1)(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 9494 operations, with intermediate bit lengths bounded by 222O(d)2^{2^{2^{O(d)}}}. Four additional operations give a 9898-operation program with the bound 22O(d)2^{2^{O(d)}}. Hua's bound gives corresponding programs with 103103 and 107107 operations and replaces O(d)O(d) by O(dlog⁡d)O(\sqrt d\log d) in these size bounds. Once the fundamental solution is known, generating-function formulas compute the nn-th positive solution in 2121 further operations by extracting its coordinates as base-bb digits. We prove that 2X1(X1+1)−12X_1(X_1+1)-1 is the least integer base for which both formulas are defined and correct for every n≥1n\ge1.

Create a lesson

Metadata

Comments
27 pages