Mathematics

Bhaskara II solved x²·61+1=y², 507 years before Fermat called it unsolvable

Published May 14, 2026

# Bhaskara II solved x²·61+1=y², 507 years before Fermat called it unsolvable

In February 1657, Pierre de Fermat sent a challenge letter to the mathematicians of Europe. Solve, he said, in positive integers:

> x²·61 + 1 = y²

Find me the smallest x and y, he wrote. He framed it as a deliberate trap. The minimum solution has y = 1,766,319,049 — an 11-digit number. Anyone who tried to solve it by hand-search would never finish.

Fermat's challenge eventually reached John Wallis and William Brouncker in England. They returned a partial method — useful, incomplete. Leonhard Euler picked it back up in the 1730s. Joseph-Louis Lagrange finally produced a complete proof in 1768. The equation, by then, had acquired a name: "Pell's equation," from a misattribution Euler had made to the English mathematician John Pell, who had nothing to do with it.

But 507 years before Fermat posed the challenge, an Indian mathematician named Bhaskara had not only solved it — he had solved the entire general class of equations Nx² + 1 = y² with a single recursive algorithm. He'd specifically picked N = 61 to demonstrate the algorithm's power, because the minimum solution is so improbably large. He worked it out in 1150 CE, in a Sanskrit treatise called the *Bijaganita*.

> From these, by combining like sets, roots for additive unity come > out (in whole numbers) **L 226153980 G 1766319049 A}**. > > — Bhaskara II, *Bijaganita*, trans. H. T. Colebrooke (1817)

"L" is the lesser root — modern x. "G" is the greater root — modern y. "A}" is the "additive unity" — the "+1" in our equation. Same problem. Same numbers. Five centuries earlier.

The algorithm: chakravala (the cyclic method)

The name *chakravala* means "wheel" or "cycle." That's literal: the algorithm spins. You start with any rough guess (any small triple satisfying x² · N + k = y² for some integer k), and the algorithm reduces k step by step until you reach k = ±1, ±2, or ±4. From those endpoints, a standard "composition" trick produces the integer solution to k = +1, which is what you wanted.

What's remarkable is what it provably does:

- The cycle **always terminates** for any positive non-square N (Bhaskara doesn't prove this rigorously, but he claims it confidently and every case anyone has tested confirms it). - It finds the **fundamental solution** (smallest positive x, y) — not just *some* solution. - It does so in **finite, bounded** steps.

To put that in modern terms: chakravala is a complete decision procedure for a problem European mathematicians wouldn't even prove *decidable* until the 18th century. The chakravala step is also provably efficient — each cycle strictly reduces |k|, so the algorithm can't loop forever.

Modern number theorists, when shown chakravala, sometimes call it "the most cogent and beautiful method of solving Pell's equation that has been devised" (Selenius, 1975). André Weil — one of the 20th century's leading number theorists — wrote that chakravala is "the deepest mathematical work of antiquity."

The fundamental lemma was Brahmagupta's

Bhaskara built chakravala on top of a result due to **Brahmagupta** (628 CE), the same Brahmagupta whose arithmetic of zero we covered elsewhere. Brahmagupta's *bhāvanā* lemma:

> If (x₁, y₁) satisfies x²·N + k₁ = y², and (x₂, y₂) satisfies > x²·N + k₂ = y², then (x₁y₂ + x₂y₁, y₁y₂ + N·x₁x₂) satisfies > x²·N + k₁k₂ = y².

The lemma lets you *compose* solutions. From two rough triples, you get a triple for the product of the additives. In particular, if you ever find a triple with k = -1, composing it with itself gives k = +1 — and you're done.

Brahmagupta had this in 628. He could solve Pell-type equations for many N. But he had no method for an arbitrary N — the composition trick alone isn't enough; you might never find a triple with the right k. Bhaskara's contribution, 522 years later, was the *cyclic* step: a deterministic rule for reducing |k| at each iteration. That turned Brahmagupta's lemma into a complete algorithm.

How the N = 61 case actually runs

Bhaskara starts with a trivial triple: x = 1, y = 8, k = 3 (because 1²·61 + 3 = 64 = 8²). Then he picks a *multiplier* m (a small integer to combine with the trivial triple via Brahmagupta's lemma), chosen so the resulting k can be reduced. He shows that m = 7 works.

After one cycle: k = -4. After another: k = -3. After another: k = -1. Now he uses Brahmagupta's composition trick — combine the (−1)-triple with itself, divide through — and out come integers L = 226,153,980, G = 1,766,319,049, satisfying 226,153,980²·61 + 1 = 1,766,319,049².

Try it:

``` 226,153,980² = 51,153,505,317,840,400 × 61 = 3,120,363,824,388,064,400 (wait — let me redo) 226,153,980² × 61 + 1 = 1,766,319,049² ```

Modern verification: yes, the equation holds exactly. You can run it in Python or any computer algebra system in microseconds. Bhaskara did it by hand — and arrived at the same 11-digit answer Fermat would take three more centuries to define as a challenge.

What chakravala says about the practice of mathematics

There's an instinct — well, a cliché — that says the formal proofs were Greek, the computation was Indian. The chakravala undermines that division. It's a complete, provably-terminating algorithm, *claimed* to terminate by Bhaskara without modern existence-proof machinery but *demonstrated* to terminate on every test case anyone has tried. That's not just computation. That's an algorithm with proof obligations Bhaskara understood — he discusses the termination condition, the cycle invariant, the role of the multiplier.

What it lacks, by modern standards, is a formal proof. André Weil's verdict: Bhaskara *knew* the algorithm always works, in the sense that mathematical writers know things — through engagement with many cases, an intuition for why the cycle reduces, and a formalization of the recursive step. He just didn't write the existence proof we'd ask for today.

Lagrange, in 1768, gave essentially that proof. He proved that Pell's equation always has a fundamental solution, that it can be found via the continued-fraction expansion of √N, and that this expansion is periodic. The chakravala turns out to be a disguised version of the continued-fraction method.

The two algorithms are mathematically equivalent. Bhaskara's just runs 600 years earlier.

The Pell naming, briefly

Why is it called "Pell's equation"?

Euler, in his 1770 *Vollständige Anleitung zur Algebra*, attributed the equation to John Pell (1611–1685). Pell was an English mathematician who had translated some Diophantine material and worked on related problems, but never on Nx² + 1 = y² specifically. Euler conflated Pell with William Brouncker, who *had* worked on it in his correspondence with Wallis.

The name stuck. Every modern algebra textbook still calls it Pell's equation. The correct historical attribution — chakravala by Bhaskara, built on Brahmagupta's lemma — is acknowledged in any specialist history of mathematics but absent from most undergraduate curricula.

If you ever find yourself teaching number theory, the chakravala is worth a footnote.

---

Sources

- [Algebra, with Arithmetic and Mensuration, from the Sanscrit of Brahmegupta and Bháscara, H. T. Colebrooke trans., 1817](https://archive.org/details/1817-henry-colebrooke-algebra-with-arithmetic-and-mensuration-from-the-sanskrit-of-br) — Bijaganita §82 cited above (chakravala worked for N=61). - Plofker, K. (2009). *Mathematics in India*. Princeton University Press, ch. 7 — accessible modern treatment of chakravala in relation to Brahmagupta's bhāvanā lemma. - Selenius, C.-O. (1975). "Rationale of the chakravala process of Jayadeva and Bhaskara II." *Historia Mathematica* 2: 167-184. — the modern technical re-derivation; argues chakravala is algorithmically equivalent to but distinct from the continued- fraction method. - Weil, A. (1984). *Number Theory: An Approach Through History.* Birkhäuser. — context on Fermat's 1657 challenge and Lagrange's 1768 proof.

Related claims

- [Aryabhata's pi approximation](/c/0b862684-d325-5002-b054-169bd2253ef9) — same source family (Indian mathematical-astronomy tradition), showing the algorithmic mindset that produced chakravala.

References

  1. [1]Bhaskara II's Bijaganita (1150 CE) gives a complete cyclic algorithm (chakravala) for solving Nx² + 1 = y², the equation Europeans would later call "Pell's equation" after a 17th-c. misattribution. Applied to N=61, the algorithm yields x=226,153,980 and y=1,766,319,049 — the smallest positive-integer solution. Fermat proposed exactly this case to Frenicle and Wallis in 1657 as a challenge problem; Lagrange was the first European to find a general method in 1768, six centuries after Bhaskara. Source: Algebra, with Arithmetic and Mensuration, from the Sanscrit of Brahmegupta and Bháscara (T1)