Aryabhata and sums of squares, arithmetic progressions, cubes of consecutive numbers
Date : 04/05/2024
It is the first hour of the school day. The fifth graders are excited to meet a new pet that a classmate has snuck in a tiny mouse. Squeals of laughter and excited chatter greet the mouse as he is taken to the front of the class. After the little guest has been held up and happily displayed to the entire class, he is quickly shoved into the teacher’s desk for safekeeping.
There’s excitement in the air. The children cannot wait to see the teacher’s face when she meets the guest in her desk drawer.
The teacher walks in. She begins the class and writes out the classwork on the board. When it’s time to erase the board, she opens the drawer and reaches in for the eraser. The scared, agile mouse rushes past her hand and jumps out the drawer, onto the floor, and vanishes out the door.
The teacher shrieks. Her expression sparks guffaws around the room. Thrilled, happy faces all around the classroom. The teacher is not amused. Thanks to her experience, she knows it is best to grab the attention of the students with cleverness, than with anger.
“Alright, you have had your fun,” she says. “Raise your hand if you brought the mouse to school. I will not send you the principal’s office. But will only ask you to solve a math problem.”
The class isn’t very sure. No hand goes up.
“Don’t worry. It will be an interesting math problem. I promise,” she goads them. Slowly, a hand goes up.
The teacher smiles. “Really ... you? Sophie?!” she asks. Sophie is a sharp girl, who is known to think on her feet. “Tell me,” the teacher says, “What is the sum of the first 100 positive integers? This should keep you busy for a while,” she adds.
Sophie thinks for a moment. She understands the problem given to her:
1 + 2 + 3 + 4 + ... + 98 + 99 + 100
She quickly realises that there is a pattern and that it is for her to find it. She ponders for a brief while. She sees that the first and last numbers add up to 101. The second numbers from the first and last also add up to 101. Similarly, the third numbers from the first and the last too. And so on...
1 + 100 = 101
2 + 99 = 101
3 + 98 = 101
⋮
48 + 53 = 101
49 + 52 = 101
50 + 51 = 101
With 100 numbers, she knows there are 50 such pairs. All of them adding to 101.
So, the final total would be 50 × 101 = 5050.
Bingo! Sophie had solved the problem. “Ma’am, the answer is 5050,” she said triumphantly.
The teacher is impressed and applauds Sophie’s problem solving ability. The mouse is all but forgotten.
The teacher explains the solution to the class. She writes the sum twice - one in the regular order and the other in the reverse order:
1 + 2 + 3 + 4 + ... + 99 + 100
100 + 99 + ... + 4 + 3 + 2 + 1
She then adds the numbers vertically. Each pair of numbers adds up to 101:
1 |
+ |
2 |
+ |
3 |
+ |
... |
+ |
98 |
+ |
99 |
+ |
100 |
100 |
+ |
99 |
+ |
98 |
+ |
... |
+ |
3 |
+ |
2 |
+ |
1 |
101 |
+ |
101 |
+ |
101 |
+ |
... |
+ |
101 |
+ |
101 |
+ |
101 |
Since there are 100 of these sums of 101, she multiples.
100 × 101 = 10100
This sum, 10100 is twice the sum of the numbers 1 through
100. So, the sum of the first 100 whole numbers is
In other words, the sum of the first n positive integers is
After she finishes, the teacher faces the class. The children look happy - what seemed like a time consuming problem could now be solved in a jiffy using a simple formula.
The children clap for Sophie, and she smiles warmly at her friends. “Was it really you that brought the mouse to school today?” the teacher asks Sophie with a big grin. The children burst out laughing. Sophie smiles sheepishly, happy to have gotten a classmate out of trouble.
Now, let us examine the problem more closely. Suppose you had to find the sum of 100 consecutive numbers starting from say 37.
37 + 38 + 39 + ... + 136 =?
How would you do it? You would notice, as Sophie did, that 37 + 136 = 173. So is 38 + 135 = 173 and so on. Again, there are 50 such pairs and so the answer must be
37 + 38 + 39 + ... + 136 = 173 × 50 = 8650
Now let us see if we can describe a formula for what is happening here. Suppose that you have to add n consecutive integers, starting from a. Then, the last number to be added is a + (n − 1) and we will call it l. We see that
a + l = (a + 1) + (l − 1) = (a + 2) + (l − 2) = ...
There are such pairs and so the formula for the sum appears to be
Wait! What if n is an odd number? How can there be pairs then? How do we know that the formula above produces a whole number?
Notice that if we start from an odd number a and n is odd, the last number l = a + (n − 1) is also odd. Similarly, if a is even and n is odd, the last number l = a + (n − 1) is also even. In other words, when n is odd, the first number a and the last number l are either both even or both odd. In that case, a + l is always even. So, the formula always produces a whole number.
The formula here can do more than just find sums of consecutive numbers. What if you wanted to calculate
37 + 39 + 41 + ... + 235 =?
This is a sequence of 100 numbers starting from 37, but jumping two places with each step. How about
37 + 40 + 43 + ... + 334 =?
This time we jump three places with each step. Amazingly, the formula still works. Notice that
37 + 334 = 40 + 331 = 43 + 328 = ... = 371
There are 50 such pairs and so the answer is
37 + 40 + 43 + ... + 334 = 371 × 50 = 18550
A sequence of this kind is known as an arithmetic progression. We start with a number a and then take n steps, each of common length d. Notice that the last term of this sequence becomes a + (n − 1)d. So, we have to add the numbers
a,a + d,a + 2d,a + 3d,...,a + (n − 1)d
Taking the first and last terms and applying our formula, we get that the sum of these numbers should be equal to
This formula for adding terms in an arithmetic progression was discovered by Aryabhata I, who was one of the most remarkable mathematicians in the ancient world. You have probably heard of him before as well for his discovery of the zero. The first ever artificial satellite designed in India and launched in 1975 was named ‘Aryabhata’ in his honor.
Aryabhata was born in the year 476. Historians differ about the place of his birth, but it is most widely believed that he was a native of Kusumapura, which was later called Pataliputra (near present day Patna in Bihar). At the time, the city was the capital of the Gupta empire and a great seat of learning. He wrote the Aryabhatiya, the first of his two most famous books, at the mere age of 23 years, the other being the Arya-Siddhanta. In his work, he touched upon all the foundational topics of basic mathematics, from trigonometry to one of the best approximations of the number π.
We have already seen that the sum of the first n numbers is equal to . What if we were curious and took this to the next level, asking to find the sum
12 + 22 + ⋅⋅⋅ + n2
Is there a formula for this? Aryabhata gives us the answer
How might someone prove something like this? Aryabhata does not tell, but it is likely that he used some form of geometric reasoning. Remember that the surface area of a square with side of length k is equal to k2. So one way to find a formula for the sum of squares would be to visualize squares of bigger and bigger sizes stacked on top of each other. This is known as the method of ‘piling shapes.’ You can do so in various creative ways and discover all sorts of algebraic formulas. Have fun with it!
Here’s another idea to find the sum of squares. Let’s begin with a simple table
1 = 1 |
1+ 3 = 4 |
1+3+ 5= 9 |
1+3+5+7=16 |
1+3+5+7+9=25 |
1+3+5+7+9+11 = 36 |
1+3+5+7+9+11+13 = 49 |
Table 1: Sums of odd numbers
You have probably noticed the pattern already. On the left side, we add consecutive odd numbers. On the right side, we get the perfect squares.
A couple of lines of simple algebra confirms this pattern. The first n odd numbers are
1,3,5,...,2n − 1
Using the formula for adding terms in an arithmetic progression, we get
Thus, in order to find the sum (12 + 22 + 32 + ⋅⋅⋅ + n2), we have to add the odd numbers appearing as in Table 1 above.
When adding the left hand sides of the expressions in Table 1, the number 1 appears n-times. The number 3 appears (n− 1)-times and so on, with the odd number (2k −1) appearing
(n − k + 1)-times. This gives us the formula
Simplifying this expression, we get
Moving the term to the left hand side, it follows that
In fact, Aryabhata even gives us a formula to find the sum of cubes
13 + 23 + ⋅⋅⋅ + n3
Before we give you the formula, let’s take a look at the actual numbers; because we are in for a surprise.
13 = 1 |
13 + 23 = 9 = 32 |
13 + 23 + 33 = 36 = 62 |
13 + 23 + 33 + 43 = 100 = 102 |
13 + 23 + 33 + 43 + 53 = 225 = 152 |
13 + 23 + 33 + 43 + 53 + 63 = 441 = 212 |
13 + 23 + 33 + 43 + 53 + 63 + 73 = 784 = 282 |
Table 2: Sums of cubes
Remarkably, it seems the sum of successive cubes always turns out to be a perfect square. But the squares of which numbers? Unlike Table 1, we don’t get successive squares. Instead, we get the squares of 1,3,6,10,15,21,28,....
Where have we met this sequence of numbers before? Oh right!
1 = 1 |
1+ 2 = 3 |
1+2+ 3= 6 |
1+2+3+4=10 |
1+2+3+4+5=15 |
1+2+3+4+5+6= 21 |
1+2+3+4+5+6+7= 28 |
In other words, we have the formula
Again, we do not know for sure how Aryabhata arrived at this formula, beyond pure intuition. He might have used a geometric method, this time using the fact that the volume of a cube of size n is n3 and the method of ‘piling’ hinted at above.
Nowadays, the ‘standard’ method for proving this and many other similar formulas relies on a very powerful mathematical principle known as induction.
The idea is simple. It is usually easy to check any formula for the explicit value n = 1. Now comes the induction step.
● Assume that the formula is true for some n.
● Using your assumption that the formula is true for some n, show that it is also true for n + 1.
Do you see how this works? You start by checking that the formula is true for n = 1. Now, by your induction step, the fact that the formula holds for n = 1 implies that it must hold for n = 2. Again, using the induction step, the fact that the formula holds for n = 2 implies that it must hold for n = 3 and so on for all positive numbers.
The Yuktibhasha, written many centuries after Aryabhata by mathematicians of the Kerala school uses this exact method for proving the formula for the sum of cubes. Observe however that the method of induction has one essential drawback: you must guess the formula before you get down to proving it. By itself, the principle of induction gives you no hint about how to come up with the formula in the first place! You will have to use your intuition for that.
Let us make one final remark on the sums of consecutive integers. Given a number, can we detect whether it can be written as a sum of consecutive integers starting from 1? In other words, given a number k, we want to know if there are solutions to the equation
In mathematics, it is often valuable to consider not just a problem, but also the converse of it. For example, finding the square of a given number is relatively straightforward. The converse of that would be to find the square root of a number. You would know from high school that the latter operation is often rather difficult.
For example, if k = 820, we see that we can solve the equation by setting n = 40. But there are many other values, such as k = 825 for instance, for which the equation has no solutions. For small values of k, we can find out the value of n (if it exists) by plugging in all possible values of n. But this method becomes quickly unmanageable for larger values of k.
This general question is one of the ways which led Aryabhata to consider what are known as quadratic equations, i.e., equations involving the second power of the unknown quantity. Unlike a simple equation (also known as a linear equation) such as 3n + 4 = 25, you cannot solve for n by gathering terms on the two sides of the ‘=’ sign, cross multiplying and dividing.
In order to know whether a given number can be written as a sum of consecutive integers starting from 1, Aryabhata needed to solve an equation such as 2850. Simplifying the terms, we get
n2 + n − 5700 = 0
In a future article, we will come back to how mathematicians in ancient India coped with quadratic equations and obtained a single comprehensive formula to solve them all!
In this article, we have spoken of the induction principle and mentioned that it is one of the most powerful ideas in all of mathematics. You have probably heard of Fermat’s Last Theorem, the fact that there are no positive numbers satisfying the equation
xn + yn = zn
for n ≥ 3. In other words, it is impossible to write a cube as a sum of two cubes, a fourth power as a sum of fourth powers and so on.
The statement of this result was found scribbled in the margins of a book that belonged to Pierre Fermat, a famous French lawyer and mathematician who lived in the 17th century. He added rather cryptically that he had found a “truly wonderful proof,” which the margin was too small to contain.
Deceptively simple and alluring, the conjecture led to a ‘gold rush’ among mathematicians in search of a proof. Various proofs were proposed but they all turned out to contain some gap or another. As decades passed, it became clear that the proof would not be easy in a classical sense and the problem would have to be tackled by entirely new approaches. Many great mathematicians were motivated by the problem. They ended up opening new avenues that became sophisticated fields of research within algebra and number theory.
A proof of Fermat’s Last Theorem was finally discovered in 1995 by British mathematician Andrew Wiles, with important contributions by his former student Richard Taylor. In fact, they proved an even stronger result, which was called the Shimura - Taniyama conjecture and is now known as the Modularity Theorem. Although the proof is extremely hard and accessible only to specially trained professional mathematicians, at a very basic level, it does invoke the principle of mathematical induction.
In retrospect, the real treasure of Fermat’s Last Theorem wasn’t in the proof itself. It was in the three centuries of beautiful mathematics that was created along the way.
Chitra Aiyer has worn many hats - she has been a technical writer, a freelance writer, blogger, professional photographer, and an architect. She is interested in all things Indian and enjoys reading and writing. She trained in architecture and professional writing.
Abhishek Banerjee is an associate professor of mathematics at Indian Institute of Science, Bangalore. He tweets at @AbhishBanerj
Feature Image: Post Card News, Google
Thumbnail: Expii
Tags :
Note: Your email address will not be displayed with the comment.