Here is a puzzle a scribe inked centuries before Fermat: find a square which, multiplied by eight and increased by one, is itself a square. The answer on this page is 6 — and 6² × 8 + 1 = 289, the square of 17. In modern terms, we need integers x and y such that 8x² + 1 = y². The Indian algebraists called these varga-prakṛti problems — the "square-nature" — and solved them with an algorithm of stunning elegance: the cakravāla, the cyclic method.

The Square-Nature Problem

Indian algebra called these varga-prakṛti problems — the "square-nature" — and posed them as riddles for the expert, the bījajña. The commentary on Bhāskara's Bījagaṇita walks the reader through the first example by hand.

What square, multiplied by eight and increased by one, becomes a square? Here, that which is multiplied by eight is unknown; assuming a desired number in its place, and by the composition as stated, the root of the square is known—this is it. 6. Then its square is 36. This, multiplied by eight and increased by one, becomes the square 289.

— Sūryabhāṣya, page 76

The scribe is showing the student how to verify the solution: take 6, square it to get 36, multiply by 8 to get 288, add 1 to get 289. The square root of 289 is 17, so the pair (6, 17) satisfies the equation. But finding the first solution is hard; the algorithm that finds all solutions, and does so efficiently, is the cakravāla.

Composition: Building Bigger Solutions

The key move is bhāvanā — "composition" — a way of combining two known solutions to manufacture a third, then a fourth, indefinitely. Every solution has three parts:

  • prakṛti — the coefficient that scales the square (8 in our example)
  • kṣepa — the additive that completes it into a perfect square (1 in our example)
  • kaniṣṭha and jyeṣṭha — the lesser and greater roots that witness the equality (6 and 17)

If you have one solution (x₁, y₁) to the equation px² + k = y², you can combine it with any other integer m to generate a new solution through the composition rule. This is not trial-and-error; it is a deterministic algorithm that manufactures solutions from one seed solution.

The Cyclic Method

When the numbers grow unwieldy, the rule says to reduce the multiplier, then compose again — and to keep the remainder as small as possible each time.

If the square of the multiplier were greater than the square of the multiplier [of the] prakṛti, it should be reduced. Thus in both ways, as the remainder should be small, so it is to be reduced—this is the meaning.

— Sūryabhāṣya, page 79

Repeat the reduction, recompose, and the roots climb; because the process turns back on itself, the teachers called it cakravāla — the cyclic method. The algorithm chooses m at each step to minimize the intermediate kṣepa (remainder). This greedy minimization, repeated in cycles, eventually yields a solution to the original equation. The beauty is that the method terminates — it does not loop forever or diverge.

Modern number theorists, studying this manuscript centuries after its composition, recognized the cakravāla as essentially equivalent to the continued fraction expansion of √p, a technique that was not independently discovered in Europe until the 17th century, and not fully understood until Lagrange's work in the 18th century. The Indian mathematicians had solved Pell's equation — the hardest indeterminate equation known to classical algebra — and left a complete algorithm in verse.

A Creeper in the Garden of the Heart

The commentary closes the section with an image as striking as the mathematics: the square-nature is a creeper planted in the heart's garden, and even its smallest root grows toward the greatest.

The square-nature, like a creeper, having been made firm, spreads out—this is the meaning. ... of that [creeper] planted in the garden of the heart, by the contemplation of vajra-practice, even the smallest root becomes the greatest.

— Sūryabhāṣya, page 82

The language is devotional, but the math is sound. A small solution to the varga-prakṛti equation, when fed into the cyclic algorithm, generates larger and larger solutions. Each cycle is a "spreading" — the smallest root, cultivated, becomes the greatest. This is not metaphor; it is precise description of what the algorithm does. Modern number theorists recognize cakravāla as a complete solution of Pell's equation and rank it among the most brilliant algorithms produced before modern times. On this page it is also something rarer: mathematics that speaks of the heart.