The coin-toss problem and Nārāyaṇa’s sequence
If you toss a fair coin times how many of the possible result-sequences of tosses will not have a successive run of 3 or more Heads? The same can be phrased as given
tosses of a fair coin, what is the probability of not getting 3 or more successive Heads in the result-sequence. For a single toss
we have two result-sequences
; so we have 2 result-sequences with no run of 3 or more continuous Heads. Let
be the number of tosses,
the number of result-sequences satisfying the condition and
the probability of its occurrence. This can be tabulated for the first few coin tosses as below:
Thus we get the sequence as from which we can compute the probability as
. The question then arises at to whether there is a general formula for
. The answer to this comes from a class of sequences described by the great Hindu scientist Nārāyaṇa paṇḍita in 1356 CE. In his Gaṇita-kaumudī he provides the following (first brought to the wider public attention in modern times by Paramand Singh in his famous article on such sequences):
ekāṅkau vinyasya prathamaṃ
tat saṃyutiṃ puro vilikhet |
utkramato ‘ntima-tulya-
sthānāṅka-yutim puro vilikhet ||
First placing 1 twice , write their sum ahead
. Write ahead of that, write the sum of numbers in reverse order [and in] positions equal to the “terminal”
.
utkramato ‘ntima-tulya-
sthāna-yutiṃ tat purastāc ca |
antima-tulya sthānābhave
tat saṃyutiṃ purastāc ca ||
evaṃ saika-samāsa-sthānā-sāmāsikīyaṃ syāt |
Write ahead of that, write the sum of numbers in reverse order [and in] positions equal to the “terminal” (continue process). (This means: If then
) In the absence of [numbers in] positions equal to the terminal write in the front the sum of those [in available places] (This means if
then
). Thus, the numbers till the position one more than [the prior] may be known as the additive sequence
.
One will note that if one takes then we get the famous mātrā-meru sequence
(known in the Occident as the Fibonacci sequence after Leonardo of Pisa). Nārāyaṇa then goes on to provide a numerical example for this class of additive sequences:
udāharaṇam –
samāse yatra sapta syur
antimas trimitaḥ sakhe |
kīdṛśī tatra kathaya
paṅktiḥ sāmāsikī drutam ||
Now an example: Friend, if we have 7 in the sequence and 3 as the “terminal” then quickly say what will be the additive sequence under consideration.
The sequence in consideration in modern form starting from 0 will be , with the first three terms being 0,1,1 (in Nārāyaṇa’s reckoning they will be 1,1,2): 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, 1705… Thus, Nārāyaṇa’s numerical example from
onwards gives us the solution to the coin toss problem. In modern times this sequence has been given the name “Tribonacci”. With this, one can see that the probability of the getting a result-sequence without 3 or more continuous heads decays with
asymptotically towards 0.
The convergent of Nārāyaṇa’s sequence and problem of the triple proportional partition of a segment
Consider the geometric problem: Partition a line segment of length
in 3 parts
such that
(Figure 1).
We can see that the above geometric process is equivalent to the formulation of the above tryantima-sāmāsikā-paṅkti of Nārāyaṇa (Figure 1). This indicates that, at its limit, the convergent of the above sequence of Nārāyaṇa, , will yield us the ratio in which the partition of the segment should be performed. Thus, we have:
This number, unlike the Golden ratio , the convergent of the mātrā-meru-paṅkti, cannot be constructed using a straight edge and a compass. However, as we shall see below, it can be easily constructed using two simply specified conics which can in turn be constructed using the geometric mean theorem or other standard methods (Figure 2).
1) Draw the parabola specified by with its vertex
as the origin.
2) Draw a unit rectangular hyperbola with center at
. Therefore, its equation will be
.
3) The two conics will intersect at . Drop a perpendicular from
to the
-axis to cut it at
.
.
4) Extend by a unit to get point
.
.
5) Draw a circle with as center and
as radius to cut the
-axis at
.
6) Mark point along
at a unit distance from
. Join
to
.
7) Draw a perpendicular to at
. It will cut the
-Axis at point
. Join
to
. By the geometric mean theorem
.
This gives us the required partition of into 3 segments each proportional to the other as
, and
proportional to the largest partition
again as
. Thus, we have:
Hence, is the root of the cubic equation
. Thus, we see that the above construction is achieved by solving this cubic via the intersection of the said parabola and hyperbola. This cubic equation has only one real root which is
. We can take the help of computer algebra to obtain the exact form of this root as:
The other two roots are complex conjugates:
Comparable to the situation with and its conjugate, these roots have a relationship of the form:
There are also some other curious identities satisfied by like:
The convergent of Nārāyaṇa’s sequence and Mādhava’s and
series
The triple partitioning of a segment leads us to a geometric construction that yields the relationship between and
(Figure 3):
Figure 3 provides a proof for this of a type the old Hindus termed the upapatti or what in today’s mathematics is a proof without words (to our knowledge never presented before). Nevertheless, for the geometrically less-inclined we add a few words below to clarify this.
In Figure 3, one can see how . It emerges once from the starting triply partitioned segment as
. The construction creates segments
in the proportion of
. Thus, we get the second occurrence of
. That in turn implies the occurrence of a vertical segment of size
. From the construction we also get
. Thus,
add up to form the congruent base angles of an isosceles right triangle with congruent sides measuring
. This implies that:
Likewise we can also see that:
Approximately contemporaneously with Nārāyaṇa’s work, apparently unbeknownst to him, Mādhava, the great mathematician and astronomer from Cerapada, presented his celebrated infinite series for the function:
We can use the first of the above relationships between and
to obtain an infinite series for the former based on the latter:
Gathering terms in order of their exponents we get:
One notices that all except the fourth powers are represented. One can compactly express this as:
Here the cyclic sequence is defined thus:
Using this series to calculate results in reasonably fast convergence with a nearly linear increase in the correct digits after the decimal point with every 4 terms. Thus, with 200 terms we get
correct to 53 places after the decimal point (Figure 4). However, we should keep in mind that
actually includes a null term which removes every 4th powers; hence, the real number of terms is lower by
.
Using just the first 3 terms we get an approximation of that works as well as
as:
We can further compare this to the famous single angle infinite series for
provided by Mādhava using bhūta-saṃkhya (the Hindu numerical code):
vyāse vāridhi-nihate rūpa-hṛte vyāsa-sāgarābhihate |
tri-śarādi-viṣama-saṃkhyā-bhaktaṃ ṛṇaṃ svaṃ pṛthak kramāt kuryāt ||
In the diameter multiplied by the oceans (4) and divided by the form (1), subtraction and addition [of terms] should be repeatedly done of the diameter multiplied by the oceans (4) and divided respectively by 3, the arrows (5) and so on of odd numbers.
In modern notation that would be:
This series converges very slowly and in an oscillatory fashion (Figure 5) reaching just 2 correct digits after the decimal point after computing 200 terms. The oscillatory convergence features an alternation of better and worse approximations, with the latter showing a curious feature. For example, with 25 terms we encounter 3.1815 which is “correct” up to 4 places after the point (3.1415) except for the wrong 8 in the second place. With 50 terms we get 3.12159465, which is correct to 8 places (3.14159465) after the point except for the wrong 2 at the second place. More such instances can be found as we go along the expansion. For example at 500 terms we get:
3.141592653589793238
3.139592655589783238
This is correct to 18 places except for 4 wrong places. Late J. Borwein and colleagues have reported an occurrence of this phenomenon even in a calculation of terms of this series.
Thus, the double angle series based on fares way better than the basic single angle Mādhava series for
. Of course, Mādhava was well aware that it converged very slowly. Hence, he and others in his school like the Nampūtiri-s, the great Nilakaṇṭha Somayājin, Jyeṣṭadeva and Citrabhānu, devised some terminal correction terms to derive alternative series to speed up convergence and obtained approximations of
that had good accuracy for those times. Two of their series which were mediocre in convergence speed are in modern notation:
This sequence produces after 200 terms.
This one works better than the above and produces after 200 terms
The third uses as a multiplicand:
This series fares much better and produces 97 correct digits after the decimal point with 200 terms. This is quite impressive because it outdoes the above double angle series based on . It is quite likely that Mādhava and Citrabhānu used this series for around 20-25 terms to obtain approximations such as the below (expressed in bhūta-saṃkhya):
vibudha-netra-gajāhi-hutāśana-triguṇa-veda-bha-vāraṇa-bāhavaḥ |
nava-nikharva-mite vṛtti-vistare paridhimānam idaṃ jagadur budhāḥ ||
The gods (33), eyes (2), elephants (8), snakes (8), the fires thrice (333), the veda-s (4), the asterisms (27), the elephants (8), the hands (2) is the measure of the circumference of a circle with diameter of , so had stated the mathematicians:
In addition to approximations of derived from studies on
series we also see that Mādhava’s successors, if not himself, were also using a sequence of continued fraction convergents of
. These were probably inspired by the ability to initially calculate good approximations using series derived from the
series such as the above. Of these a large one is explicitly stated by Śankara-vāriyar and Nārāyaṇa Nampūtiri in their work the Kriyākramakarī:
vṛtta-vyāse hate nāga-veda-vahny-abdhi-khendubhiḥ |
tithy-aśvi-vibudhair bhakte susūkṣmaḥ paridhir bhavet ||
Multiplying the diameter of a circle by snakes(8), veda-s(4), the fires (3), the oceans (4), the space (0), the moon (1) and dividing it by the tithi-s (15), Aśvin-s (2), gods (33) one may get the circumference to good accuracy.
The sequence remained a workhorse for calculating
long after the heroics of Mādhava’s school. A particularly famous double angle formula was obtained by Euler with a simple geometric proof:
Using this formula we get we get a rather good convergence and reach 122 correct places after the decimal point with 200 terms.
Tailpiece: From to
via
We may conclude by noting that the while relates to
via the
function, the Golden ratio
relates to
via the
function. This stems from the special relationship between
and the sines of the angles
and
. In the Jyotpatti appendix of his Siddhānta-śiromaṇi’s Bhāskara-II specifically presents the values of the sines of these angles as common knowledge of the pūrvācārya-s. We reproduce below his account of the angles, the closed forms of whose sines were know to them (Note that old Hindus used Rsine instead of modern
; hence the technical term “trijyā” for
. Originally, Āryabhaṭa had set
, i.e. corresponding approximately to a radian measure in minutes. Below we take it to be 1 to correspond to our modern
):
trijyārdhaṃ rāśijyā tat koṭijyā ca ṣaṣṭi-bhāgānām |
trijyā-vargārdha-padaṃ śaravedāṃśa-jyakā bhavati ||
Half the is the zodiacal sine (i.e.
). Its cosine (i.e. of
) will be the sine of
. The square root of half the square of the
becomes the sine of arrows (5) and veda-s (4) degrees ( i.e.
)
trijyā-kṛti+iṣughātāt trijyā kṛti-varga-paṅcaghātasya |
mūlonād aṣṭa-hṛtān mūlaṃ ṣaṭ-triṃśad-aṃśajyā ||
From arrow (5) times the square of the subtract the square root of 5 times the
to the power of 4. Divide what remains from above by 8; the square root of that gives
(i.e.
)
Bhāskara then goes on to give an approximation for it as fraction:
gaja-haya-gajeṣu nighnī tribhajīvā vā ‘yutena saṃbhaktā |
ṣaṭ-triṃśad-aṃśa-jīvā tat koṭijyā kṛteṣuṇām ||
The multiplied by elephants (8), horses (7), elephants (8), arrows (5) and divided by
gives the sine of
. Its cosine is the sine of 4 and arrows (5) (i.e.
).
With this approximation we get correct to 5 places after the decimal point (one would not it is
) and implies that Bhāskara was using an approximation of
correct to 4 places after the decimal point.
trijyā-kṛti+iṣu-ghātān mūlaṃ trijyonitaṃ caturbhaktaṃ |
aṣṭadaśa-bhāgānāṃ jīvā spaṣṭā bhavaty evam ||
From the square root of the product of the square of and the arrows (5) subtract
and divide what is left by 4. This indeed becomes the exact sine of
(i.e.
).
These basic sines emerge from the first 3 constructible regular polygons: the equilateral triangle yielding ; the square yielding
and finally the pentagon yields
and its multiples (Figure 6).
Thus, from the geometry of the regular pentagon (the proof is obvious in Figure 6) it is seen that these values are rather easily obtained and can be expressed in terms of the Golden ratio , which emerges in the diagonal to side ratio (Figure 6). Thus, we have:
Thus, we can use the first angle in the infinite series for to obtain the series for
in terms of
as:
This series fares excellently in computing — with the same 200 terms as used in the above experiments we get the value correct 208 places after the decimal point.
Now, instead of if we resort to the angle
from the geometry of the equilateral triangle, we get the below infinite series:
This is obviously worse than the above series with and yields 124 correct places after the point with 200 terms. Thus, it is only marginally better than the Eulerian double angle
series in its performance.