Showing posts with label Ramanujan. Show all posts
Showing posts with label Ramanujan. Show all posts

Friday, 23 December 2022

Formula for Pi

I have to remind myself from time to time what a fertile source of information is the website Cantor's Paradise. Today, I came across a tweet from the site's Twitter feed that mentioned a particularly interesting formula for \(\pi\) from Ramanujan. See Figure 1.


Figure 1: link

I'll rewrite the formula below for clarity:$$\frac{1}{\pi}=\frac{2\sqrt{2}}{9801}  \sum_{n=0}^{\infty} \frac{(4n)! (1103+26390n)}{(n!)^4 396^{4n}}$$Now when \(n=0\), we get$$  \frac{1}{ \pi } \approx \frac{1103 \sqrt{8}}{9801} \text{ and } \pi \approx \frac{9801}{1103 \sqrt{8}} $$Now how accurate is this approximation? Permalink

3.1415926535897932385 ... actual digits of pi to 20 decimal places

3.1415927300133056603 approximated digits of pi when \(n=0\) (first term)

This is a pretty impressive approximation for the first term of an infinite series! As the website says:

This gives the accurate value of \(\pi\) up to 6 decimal places, but this is only the 1st term in another infinite series. This number alone is sufficient to calculate the circumference of the Earth with a maximum error of just 1 meter. It is to be noted that while Ramanujan’s formula takes one formula to calculate up to 6 decimal places, it takes Leibniz about 5 million terms. Ramanujan’s formula could do it in one term though and each successive term adds up another 8 decimal places to the value of π. This formula holds absolutely true for finding the value of π, but there is no clear understanding of how he came up with the numbers in his formula like 9801 and 1103. Mathematicians use this formula today to find the value of π to an insurmountable extent.

Let's set \(n=1\) Permalink:

3.1415926535897932385 actual digits of pi to 20 decimal places

3.1415926535897938780 approximated digits of pi when \(n=1\) (first two terms)

So far we've only displayed \( \pi \) to 20 decimal places but with the addition of another term, there is a need for more accuracy. Here's the result of \(n=2\) Permalink:

3.14159265358979323846264338328 actual digits of pi to 30 decimal places 
3.14159265358979323846264906570 approximated digits of pi when \(n=2\) (first three terms)

There's no need to go further, the improving accuracy is obvious as a result of this amazing formula. Yesterday was Ramanujan's birthday and the twitterverse has been awash with posts about his life and his formulae. He was born on December 22nd 1887 in Tamil Nadu's Erode. 

ADDENDUM: January 16th 2023

Here is another formula for the digits of \( \pi\) that I came across in a tweet:


I won't say anymore about the formula here. I'm just mentioning it and maybe it can form the basis of a future post.

Monday, 1 April 2019

42 is the new 33


A most interesting article appeared in Quanta magazine recently titled: Sum-of-Three-Cubes Problem Solved for ‘Stubborn’ Number 33. The article begins:
Mathematicians long wondered whether it’s possible to express the number 33 as the sum of three cubes — that is, whether the equation 33 = x³+ y³+ z³ has a solution. They knew that 29 could be written as 3³ + 1³ + 1³, for instance, whereas 32 is not expressible as the sum of three integers each raised to the third power. But the case of 33 went unsolved for 64 years. Now, Andrew Booker, a mathematician at the University of Bristol, has finally cracked it: 
He discovered that 
(8,866,128,975,287,528)³ + (–8,778,405,442,862,239)³ + (–2,736,111,468,807,040)³ = 33.
Apparently he used a very efficient search algorithm but he still required the use of a supercomputer running for three weeks to come up with the solution. Reading the article I also learned that there are no integer solutions to the equation x³+ y³+ z³ = n if \(n\equiv 4 \) mod 9 or \(n \equiv 5\) mod 9. Thus 31 and 32 cannot be expressed as the sums of three cubes. Of course, I've no idea why this is so and I may investigate the reason at some point in the future.

Interestingly, the only number below 100, for which a representation as a sum of three cubes has not been found, is 42. This is a number that featured in my blog post about magic cubes. Between 101 and 1000, there are 11 other "stubborn" numbers for which a representation has not been found. These numbers are 114, 165, 390, 579, 627, 633, 732, 795, 906, 921, 975. All of these numbers have the property in common that \(n\equiv 3 \) mod 9 or \(n \equiv 6\) mod 9.

The equation x³+ y³+ z³ = n is an example of a Diophantine equation (a polynomial equation whose unknown variables must take integer values). For mathematicians, "A major result would be to prove the conjecture that n = x³ + y³ + z³ has infinitely many solutions for every whole number \(n\), except those \(n\) that have a remainder of 4 or 5 after being divided by 9."

Figure 1: solutions for values of m
between 1 and 10

My source for the following information comes from here. For some such Diophantine equations, there are infinitely many solutions. For example, x³+ y³+ z³ = 1 has infinitely many solutions because of the identities:$$(1 + 9m^3)^3 + (9m^4)^3 + (-9m^4 - 3m)^3 = 1$$ $$(1 - 9m^3)^3 + (9m^4)^3 + (-9m^4 + 3m)^3 = 1$$By assigning various integer values to \(m\), the solutions unfold. Figure 1 shows an example using values of m between 1 and 10.

If we write the equation in the form:$$x^3 + y^3 + z^3 = t^3$$ and set \(t\) to be an integer then Ramanujan found that:$$x = 3n^2 + 5nm - 5m^2$$ $$y = 4n^2 - 4nm + 6m^2$$ $$z = 5n^2 - 5nm - 3m^2$$ $$t = 6n^2 - 4nm + 4m^2$$If we set \(m=1\) and \(n=2\), then \(t=20\) and \(t^3=8000\). Thus for the equation:$$x^3+y^3+z^3=8000$$there is the solution \(x=17\), \(y=14\) and \(z=7\) or $$17^3+14^3+7^3=8000$$While these results are interesting, they clearly only work for certain numbers and provide no help at all in solving a still outstanding problem like:$$x^3+y^3+z^3=42$$A specific curiosity that should be mentioned is:$$ 3^3 + 4^3 + 5^3 = 6^3$$Another is the smallest cube number that is the sum of three different positive cubes. This turns out to be 216 or 6^3 and itself the sum of \( -3^3+6^3+3^3 \). 729 or \( 9^3 \) is the next such number since \(8^3 + 6^3 + 1^1 = 729\). 729 is a perfect cube and a perfect square since \(27^2=729\).

Here is the excellent Numberphile video on YouTube in which Andrew Booker talks about his discovery:




UPDATE (7th September 2019): a solution for 42 has been found:

Monday, 26 November 2018

Augustus De Morgan

Augustus De Morgan was a British mathematician and logician. He formulated De Morgan's laws and introduced the term mathematical induction, making its idea rigorous. He famously stated that he was \(x\) years old in the year \(x^2\), leaving us to surmise when he was born. A definite answer is possible once we know that he was born in the 19th century. This is a laughably simple problem and I am not suggesting that it has any mathematical significance but it popped up as an exercise in a book that I just started reading titled "Elementary Number Theory with Applications" by Thomas Koshy. It inclined me to find out a little more about this mathematician but first let's deal with the problem, simple as it might be.

One approach is to find a number between 1801 and 1900 that is a square number. There is only one such number and that is \(1849=43^2\). Thus we can say that he was born in 1806 and indeed he was born on the 27th of June 1806 and died on the 18th March 1871). This leads us to ask what in the next birth year that would allow its natives to make a similar claim. Well, those who were 44 years old in 1936 could make such a claim since \(1936=44^2\) and all would have been born in the 1892. Similarly, anyone born in 1980 will turn 45 in the year \(2025=45^2\).

The same approach could be taken with the cube of the year. If one were 12 years old in 1728, the claim could be made that one was \(x\) years old in the year \(x^3\). One would have be 13 years old in 2197 to make the same claim. The years that are perfect cubes will obviously be much farther apart than the perfect squares.


What about De Morgan himself? The Wikipedia article seems to give the most comprehensive account of his life. I was reminded that I had a copy of E. T. Bell's "Men of Mathematics" but De Morgan doesn't get a mention in that. He was a confirmed athiest:
His mother was an active and ardent member of the Church of England, and desired that her son should become a clergyman, but by this time De Morgan had begun to show his non-conforming disposition. 
As he himself said in 1838:
There is a word in our language with which I shall not confuse this subject, both on account of the dishonourable use which is frequently made of it, as an imputation thrown by one sect upon another, and of the variety of significations attached to it. I shall use the word Anti-Deism to signify the opinion that there does not exist a Creator who made and sustains the Universe. 
Even though he obtained a Bachelor of Arts degree at Cambridge, he could not progress to a Master's degree because that involved a theological test to which De Morgan would not subject himself to (even though he had been brought up in the Church of England).
As no career was open to him at his own university, he decided to go to the Bar, and took up residence in London; but he much preferred teaching mathematics to reading law. About this time the movement for founding London University (now University College London) took shape. The two ancient universities of Oxford and Cambridge were so guarded by theological tests that no Jew or Dissenter outside the Church of England could enter as a student, still less be appointed to any office. A body of liberal-minded men resolved to meet the difficulty by establishing in London a University on the principle of religious neutrality. De Morgan, then 22 years of age, was appointed professor of mathematics.
The theological test for Oxford and Cambridge was abolished in 1875. De Morgan was an outstanding teacher of Mathematics as well as a brilliant and witty writer. He was a lifelong friend of the Irish mathematician William Rowan Hamilton who discovered the Quaternions.

Of his childhood:
Augustus De Morgan was born in Madurai, India in 1806.[a] His father was Lieut.-Colonel John De Morgan (1772–1816), who held various appointments in the service of the East India Company. His mother, Elizabeth Dodson (1776–1856), was a descendant of James Dodson, who computed a table of anti-logarithms, that is, the numbers corresponding to exact logarithms. Augustus De Morgan became blind in one eye a month or two after he was born. The family moved to England when Augustus was seven months old. As his father and grandfather had both been born in India, De Morgan used to say that he was neither English, nor Scottish, nor Irish, but a Briton "unattached", using the technical term applied to an undergraduate of Oxford or Cambridge who is not a member of any one of the Colleges.
In Autumn of 1837, he married Sophia Elizabeth Frend (1809–1892). Of his family:
De Morgan had three sons and four daughters, including fairytale author Mary de Morgan. His eldest son was the potter William De Morgan. His second son George acquired distinction in mathematics at University College and the University of London. He and another like-minded alumnus conceived the idea of founding a mathematical society in London, where mathematical papers would be not only received (as by the Royal Society) but actually read and discussed. The first meeting was held in University College; De Morgan was the first president, his son the first secretary. It was the beginning of the London Mathematical Society. 
Unfortunately, his son George (the previously mentioned first secretary of the London Mathematical Society) died and not long after a daughter. After this, his health deteriorated and he died of "nervous prostration" at age 64.

De Morgan also promoted the work of the self-taught Indian mathematician Ramchundra. Here is an excerpt from the Wikipedia article about Ramchundra:
Ramchundra (1821–1880) was a British Indian mathematician. His book, Treatise on Problems of Maxima and Minima, was promoted by the prominent mathematician Augustus De Morgan. In his introduction to Ramchundra's book, De Morgan says that he was born in 1821 in Panipat to Sunder Lal, a Kayasth of Delhi. De Morgan came to know of Ramchundra when, in 1850, he was sent by a friend to work on maxima and minima by the 29-year-old self-taught mathematician. Ramchundra had published his book at his own expense in Calcutta in that year. De Morgan arranged for the book to be republished in London under his own supervision. De Morgan was so impressed that he undertook to bring Ramchundra's work to the notice of scientific men of Europe. Charles Muses, in an article in the Mathematical Intelligencer (1998) called Ramchundra "De Morgan's Ramanujan". He was mystified why, in spite of De Morgan's efforts to make this "remarkable Hindu algebraist known, he does not appear in most texts on history of mathematics." Ramchundra was teacher of science in Delhi College for some time. In 1858, he was native head master in Thomason Civil Engineering College (now Indian Institute of Technology, Roorkee) at Roorkee. Later that year, he was appointed head master of a school in Delhi.

Sunday, 1 April 2018

Highly Composite Numbers

Today I turned 25200 days old and I was surprised to find that this number has a staggering 347 entries in the Online Encyclopaedia of Integer Sequences (OEIS). Most numbers of this size are lucky to have more than a dozen entries. So what's so special about 25200? Well, it turns out to be a highly composite number, a term first coined by Ramanujan in 1915 and defined as a number that sets a record for the highest number of factors (in this case 90). Here is a table from Wikipedia showing details for the first 38 highly composite numbers (sequence A002182 in the OEIS).
OrderHCN
n
prime
factorization
prime
exponents
prime
factors
d(n)primorial
factorization
1101
22112
34223
461,124
5122,136
6243,148
7362,249
8484,1510
9602,1,1412
101203,1,1516
111802,2,1518
122404,1,1620
133603,2,1624
147204,2,1730
158403,1,1,1632
1612602,2,1,1636
1716804,1,1,1740
1825203,2,1,1748
1950404,2,1,1860
2075603,3,1,1864
21100805,2,1,1972
22151204,3,1,1980
23201606,2,1,11084
24252004,2,2,1990
25277203,2,1,1,1896
26453604,4,1,110100
27504005,2,2,110108
28554404,2,1,1,19120
29831603,3,1,1,19128
301108805,2,1,1,110144
311663204,3,1,1,110160
322217606,2,1,1,111168
332772004,2,2,1,110180
343326405,3,1,1,111192
354989604,4,1,1,111200
365544005,2,2,1,111216
376652806,3,1,1,112224
387207204,2,1,1,1,110240
All highly composite numbers are products of primorials as can be see from rightmost column of the table. In the case of 25200, the primorial factorisation is \( 2^2 \times 30 \times 210 \). There is a formula for calculating the number of factors for a number n:$$ \text{If }n=\prod_{i=1}^k p_i \, c^i \text{ then } d(n)=\prod_{i=1}^k (c^i+1)$$For example: $$ 25200=2^4\cdot 3^2\cdot 5^2\cdot 7 $$ $$ d(25200)=(4+1) \cdot (2+1) \cdot (2+1) \cdot (1+1) = 5 \cdot 3 \cdot 3 \cdot 2 = 90 $$The sequence of indices is non-increasing when the prime factor bases are placed in ascending order (4, 2, 2, 1 in the case of 25200). The final index is always 1 except in the cases of 4 and 36 where it is 2, thus making 1, 2 and 4 the only square, highly composite numbers.