T TestsWorld
Lesson 7 of 8 Euclid and Āryabhaṭa ⏱ 4 min

Āryabhaṭa's division algorithm

🤔
Think first
Why subtract 2 from 99 forty-nine times when one division gives the remainder?
🎯 In this lesson you'll learn
  • ✓Use gcd(m, n) = gcd(n, m mod n)
  • ✓Do the long-division chain

Subtracting 2 again and again from 99 leaves the remainder of 99 ÷ 2. So jump straight to it!

m mod n = remainder when m is divided by n. For example 17 mod 5 = 2 and 33 mod 7 = 5.

Improved algorithm:

  1. If m < n, swap them.
  2. If n = 0, the answer is m.
  3. Otherwise, reduce to gcd(n, m mod n).

gcd(99, 2) → gcd(2, 1) → gcd(1, 0) → 1 in just 2 reductions.

Indian mathematicians did this as a chain of long divisions, found in Āryabhaṭa's Āryabhaṭīya (499 CE). Each remainder becomes the next divisor:

  • 825 = 2 × 375 + 75; 375 = 5 × 75 + 0 → gcd = 75
  • 60 = 3 × 16 + 12; 16 = 1 × 12 + 4; 12 = 3 × 4 + 0 → gcd = 4

The number of reductions now grows with the number of digits, like column addition.

16)60(34812)16(1124)12(3120gcd(60, 16)= gcd(16, 12)= gcd(12, 4)= gcd(4, 0) = 4remainder → next divisor

Tap the diagram to enlarge it

Divide, then divide the old divisor by the remainder, until the remainder is 0.
📌 Remember these
  1. Remainder replaces subtraction
  2. Last non-zero remainder = gcd
  3. Steps grow with digits
✅ Quick check
← →