THE PELL EQUATION x-squared minus N y-squared equals one; solved by a square root's rhythm
x² - N·y² = 1 for a non-square N has infinitely many integer solutions, and the smallest is found in the continued fraction of √N: its convergents eventually hit the fundamental solution, from which all others follow. The equation is old (Brahmagupta’s chakravala solved it in India c.628), the name is a mistake (Euler’s), and the method is a square root’s periodic rhythm made into integers.
THE TECHNIQUE convergents of sqrt(N) until x^2 - N y^2 = 1
Solve x² - 7y² = 1. The continued fraction of √7 = [2; 1,1,1,4, …] has convergents whose numerator/denominator eventually satisfy the equation — the fundamental solution is (8, 3): 64 - 63 = 1. Walk the convergents: live demo
HISTORY & CREDIT Brahmagupta 628; NOT John Pell
“John Pell solved the Pell equation.” — no, and it is a famous error. Euler mistakenly credited Pell, who had essentially nothing to do with it. Fermat posed it as a challenge, Brouncker solved it in Europe, and Brahmagupta (628) and Bhāskara II (1150) solved it in India centuries earlier by the chakravala method. cited
628 · Brahmagupta — the identity (x²-Ny²)(u²-Nv²)=… and a method for the equation; refined into chakravala. 1150 · Bhāskara II — the cyclic chakravala algorithm, solving cases (like N=61) Europe would not reach for 600 years. 1657 / 1767 · Fermat poses it, Brouncker solves it, Lagrange proves the continued-fraction method always works — and Euler misnames it “Pell’s”.
The engine is periodicity: √N has a periodic continued fraction, and the solution sits at the end of the first period — an irrational’s hidden rhythm read off as a pair of integers. Brahmagupta 628 (name: Euler’s error)
RECOMMEND FOR I-13 the fundamental solution, computed
On the canonical compiler the convergent of √7 gives (8,3) with 8²-7·3²=1 — integer arithmetic verifying the Diophantine identity:
Recommend: the Pell equation is LIT on I-13 — verified the fundamental solutions (8,3) for N=7 and (3,2) for N=2 satisfy x²-Ny²=1 exactly, from the continued-fraction convergents of √N computed in integer arithmetic. It closes the batch on the theme the corpus keeps returning to — credit where due: the equation is Brahmagupta’s and Bhāskara’s (628–1150), the chakravala beat Europe by six centuries, and “Pell” is Euler’s misattribution. The mechanism — an irrational’s periodic rhythm yielding exact integers — is number theory at its most surprising, and every step runs bit-exact.