**Figure 1**. Sum and difference of squares amounting to near squares.

In course of our exploration of the bhūjā-koṭi-karṇa-nyāya in our early youth we had observed that there are examples of “near misses”: . Hence, we were excited to encounter them a little later in an interesting couple of indeterminate simultaneous equations in the Līlāvatī. Exhibiting his prowess as both a kavi and a mathematician, the great Bhāskara-II furnishes the following Vasantatilakā verse in his Līlāvatī:

rāśyor yayoḥ kṛti-viyogayutī nireke

mūlaprade pravada tau mama mitra yatra |

kliśyanti bījagaṇite paṭavo’pi mūḍhāḥ

ṣoḍhokta-gūḍhagaṇitaṃ paribhāvayantaḥ || L 62||

Tell me, O friend! those 2 [numbers], the sum and difference of whose squares

reduced by one result in square numbers, wherein even experts in algebra who

keep dwelling upon the mysterious mathematical techniques

stated in six ways, come up as dim-witted [in solving this problem].

-Translation adapted from that conveyed by paṇḍita Rāmasubrahmaṇyan, a learned historian of Hindu mathematics

In terms of his kavitvam, Bhāskara-II abundantly illustrates the use of figures of speech, such as the yamaka-s or alliterative duplications. Ṛāmasubrahmaṇyan also mentions that he uses the figure of speech termed the “ullāsa” via the opposition of “paṭavaḥ” and “mūḍhāḥ” in the same verse to bring out the wonder associated with this problem, i.e. it is difficult even for those who are adept at the 6 operations of traditional Hindu mathematics: addition, subtraction, multiplication, division, squaring and square-root-extraction. The problem, put in modern notation goes thus:

Let be rational numbers with . Then,

When we first encountered it, we wondered if it was really that difficult but soon our investigation showed that it was hardly simple for us. To date, we do not have a general solution in integers, placing us squarely among the dull-witted. However, in the course of our study of the integer solutions, we discovered parametrizations with interesting connections beyond those provided by Bhāskara. We suspect he was aware of one or more of these, which is why he termed it a difficult problem for even those well-versed in arithmetic operations. In essence, the problem the generation of 2 new squares plus a unit square for each of them from the sums and differences of the areas of 2 starting squares (Figure 1). Before we consider the integer solutions, let us see the parametrizations offered by Bhāskara to obtain rational fractional solutions. By way of providing several numerical examples (a white indologist of the German school but with a style more typical of the American school had once stated with much verbiage what essentially amounts to “Hindoos must be idiots” for presenting such repetitive examples. He evidently forgot the fact that it was also the style of the great Leonhard Euler), he says:

atra prathamānayane kalpitam iṣṭam | asya kṛtiḥ | aṣṭa-guṇojātaḥ 2 | ayaṃ vyekaḥ 1 | dalitaḥ | iṣṭena hṛto jātaḥ | asya kṛtiḥ 1 | dalitā saikā | ayam aparorāśiḥ | evam etau rāśī || evam ekena+ iṣṭena jātau rāśī dvikena || (Parametrization 1)

atha dvitīya-prakāreṇa+ iṣṭaṃ 1 anena dvi-guṇena 2 rūpaṃ bhaktam | iṣṭena sahitam jātaḥ prathamo rāśiḥ dvitīyo rūpam 1 evaṃ rāśī || evaṃ dvikena+ iṣṭena | trikeṇa try-aṃśena jātau rāśī || (Parametrization 2)

The second parametrization he offers is rather simple:

He illustrates it with the integers and . With integers, we see that is defined by a fractional sequence whose denominators are the successive even numbers and whose numerators are defined by the sequence . This sequence has interesting geometric connections. One can see that it defines the maximum number of bounded or unbounded regions that a plane can be divided into by pairs of parallel lines. Thus, one can see that the of Bhāskara’s second parametrization provides the ratio the maximum partitions of a plane to the total number of parallel lines drawn in dyads used for the purpose.

**Figure 2.** Division of plane into regions by parallel lines: 3, 9, 19… regions by 1, 2, 3 pairs of parallel lines.

Bhāskara’s first fractional parametrization takes the form:

He illustrates this with , which respectively yield the pairs of solutions , , .

The problem can also be seen as that of finding the intersection between coaxial circles and hyperbolas. Restricting ourselves to intersections in the first quadrant, we can see that the general form of the solutions would be:

;

From the above, for integer solutions we can say the following: 1) Given that must be an even number, should be even. 2) Hence, from the original pair of equations, we can say that must be of opposite parity with being even and odd. 3) Further, for to be an even number it has to be divisible by 8. 4) Hence, . Therefore, all solutions should be of the form , where are integers. Beyond this, not being particularly adept at mathematics, to actually solve the equations for integers, we took the numerical approach and computed the first few pairs of solutions. It was quite easy to locate the first solution (Figure 1) which in a sense is like the most primitive bhujā-koṭi-karṇa triplet (3, 4, 5). The first few solutions are provided below as a table and illustrated as a plot in Figure 3.

**Figure 3.** First few integer solutions.

**Table 1**

We quickly noticed that there is one family of solutions that lie on a clearly defined curve (dark red in Figure 3).

**Family 1.** This family has the convergents: 1, 2, 3, 4 . We can easily obtain parametrization defining this family to be:

This yields (8,9); (64,129); (216,649); (512,2049); (1000,5001); (1728,10369); (2744,19209); (4096,32769); (5832,52489); (8000,80001). This corresponds to the the third parametrization offered by Bhāskara that may be used to obtain rational fractional or integer solutions:

athavā sūtram –

iṣṭasya varga-vargo ghanaś ca tav aṣṭa-saṅguṇau prathamaḥ |

saiko rāśī syātām evam vyakte+ atha vā avyakte || L 63

Or the sūtra: Square the square of the given number and the cube of that number respectively multiplied by 8, adding 1 to the first product, the solutions are obtained both for arithmetic examples or as algebraic parametrization.

iṣṭam asya varga-vargaḥ aṣṭaghnaḥ saiko jātaḥ prathamo rāśiḥ punar iṣṭam asya ghanaḥ aṣṭa-guṇo jāto dvitīyo rāśiḥ 1 evaṃ jātau rāśī , 1 | atha+ ekena iṣṭena 9, 8 | dvikena 129, 64 | trikeṇa 649, 216 | evaṃ sarveṣv api prakāreṣv iṣṭa-vaśād ānantyam ||

By taking as the given, the square of the square of the given number is , which multiplied by 8 is . This plus 1 yields the first number of the solution . Again given , its cube is which multiplied by 8 yields the second number of the solution, 1. Thus, we have the pair (1, 3/2). Now with 1 as the given we get (8, 9); with 2 we get (64, 129); with 3 we get (216, 649). Thus, with each of these parametrizations (i.e. all the 3 he offers) by substituting any number one gets infinite solutions.

However, this parametrization hardly accounts for all the solutions. Through analysis of the remaining solutions, we could discover several further families with distinct more complex parametrizations. They are:

**Family 2.** This family has the convergent

Here, is the -th Chebyshev polynomial of the first kind that is defined based on the multiple angle formula of the cosine function:

; ;

Thus, we get the Chebshev polynomials as:

; ;

Thus, we get the pairs (8,9); (288,289); (9800, 9801); (332928, 332929). All these points lie on the line

One observes that where 2, 12, 70, 408

From the above, it is easy to prove that the sequence of fractions are successive convergents for . For we get , which is Baudhāyana’s convergent approximating to 5 places after the decimal point.

**Family 3.** This family has the convergent (green line in Figure 3). It can be parametrized thus:

Thus, the ratio of successive converges to , a number which is again related to Chebyshev polynomials of the first kind evaluated at 8:

Thus, we arrive at the pairs constituting this family as: (8,9); (80,105); (1232,1641); (19592,26121)

**Family 4.** This family has the convergent . It can be parametrized thus:

, i.e. is every 6th term of the mātra-meru sequence

Thus, we can also express using the Golden ratio :

Thus, the ratio of successive converges to ; we can also write using the hyperbolic sine function:

Similarly, we get:

As with we can also get a hyperbolic trignometric expression for :

Finally, we can also write compactly in terms of Chebyshev polynomials of the first kind:

Thus, the first few members of this family are: (8,9); (144,161); (2584,2889); (46368,51841)

**Family 5.** This family has the convergent . It can be parametrized using the continued fraction expressions of the convergent:

denominators of odd terms of the continued fraction convergents of

numerators of odd terms of the continued fraction convergents of

The relevant partial convergents are ; ; ;

Thus, we see that the convergents with odd numerators and even denominators yield the corresponding to this family, with the first term matching the second term of family 1; hence, it may be seen as branching from family 1. In practical terms, one can obtain these values using the below 2-seeded recursions:

; second term onward

; second term onward

**Family 6.** This family has the convergent . It can be parametrized using the partial convergent fractions approximating the convergent.

denominators of partial convergents of divisible by 8

numerators of partial convergents of

The relevant partial convergents are ; ; ;

The first term is the same as the second term of family 4. In practical terms, one can obtain these values using the below 2-seeded recursions:

; second term onward

; second term onward

In the case of families 4, 5 and 6, we observe that the sum and the difference of the squares of the numerators and denominators yield perfect squares. Further, the denominator is always an even number and the numerator a surd of the form or . This suggests an approach for discovering new families. Our search till 100000 uncovered 2 more families of this form

**Family 7.** This family has the convergent ;

It can be parametrized using the partial convergent fractions approximating the convergent thus:

denominators of partial convergents of divisible by 8

numerators of partial convergents of

The relevant partial convergents are:

; ;

In practical terms, one can obtain these values using the below 2-seeded recursions:

; second term onward

; second term onward

**Family 8.** This family has the convergent ;

It can be parametrized using the partial convergent fractions approximating the convergent thus:

denominators of partial convergents of divisible by 8

numerators of partial convergents of

The relevant partial convergents are:

; ;

In practical terms, one can obtain these values using the below 2-seeded recursions:

; second term onward

; second term onward

In families 7, 8 there are no small terms that connect them to any of the other families; keeping with Hindu love for big numbers, they start relatively large and grow rapidly. These 8 families cover all the solutions in Table 1 and Figure 3 . The relationships between them are shown in Figure 4.

**Figure 4.** The relationship between families.

Is there a general way to obtain all parametrizations for the integer solutions of this pair of indeterminate equations? Perhaps this has already been answered by mathematicians or perhaps not. In any case, as Bhāskara had stated, the solutions to this couple of equations is not an entirely trivial problem and sufficiently absorbing for an enthusiast of arithmetic.