Jose I. Liberati
Abstract:We introduce a generalization of the continued fraction and Chakravala algorithms for solving the Pell equation, utilizing the LLL-algorithm for rank 2 lattices.
What problem does this paper attempt to address?
The paper attempts to address the problem of solving the Pell's equation \(x^2 - dy^2 = 1\) by proposing a new algorithm to improve the traditional continued fraction method and the Chakravala method. Specifically, the authors propose two new algorithms, called the "First Algorithm with L" and the "Second Algorithm with L," which improve the traditional Chakravala method by introducing an additional variable \(l\).
The main contributions of the paper are as follows:
1. **First Algorithm with L**: In each step, select positive integers \(m\) and \(l\) such that \(a_{i-1}l_{i+1} + b_{i-1}m_{i+1}\) is divisible by \(k_i\), and \(|m_{i+1}^2 - dl_{i+1}^2|\) is minimized, where \(1 \leq l_{i+1} \leq L\). This algorithm terminates when \(k_n = 1\), finding the fundamental solution to the Pell's equation.
2. **Second Algorithm with L**: Similar to the first algorithm, but in each step, select positive integers \(m\) and \(l\) such that \(a_{i-1}l_{i+1} + b_{i-1}m_{i+1}\) is divisible by \(k_i\), and \(|m_{i+1} - \sqrt{d} l_{i+1}|\) is minimized, where \(1 \leq l_{i+1} \leq L\). This algorithm also terminates when \(k_n = 1\), finding the fundamental solution to the Pell's equation.
Additionally, the paper introduces the specific implementation methods of these two algorithms and discusses how to simplify the conditions to avoid using very large numbers. Experimental data show that when \(L\) is chosen appropriately, these two new algorithms find the fundamental solution to the Pell's equation faster than the traditional continued fraction method and the Chakravala method.