The first time I heard of the name Ramanujan was in 2017. At that time, I was wondering on the internet, searching information about infinite series connected to the work of the titan Leonard Euler. I stumbled across a page of Wolfram and I was totally hooked by the great exposition of its author. I was highly intrigued by many infinite series identities established by Ramanujan in his first letter to Hardy. Since then, I have held the deepest respect for Ramanujan for his unmatched ability of working with infinite processes (infinite series, infinite nested radicals, infinite products, infinite continued fractions). His mental power rivals that of Euler, yet his result is still highly distinctive from the master. On his blog, arguably one of the greatest mathematicians in our generation, Terence Tao, said like this about Ramanujan:
"I of course only know of Ramanujan through his work and through secondary sources, but I understand that he performed a prodigious amount of numerical computation and experimentation in the course of his research, which may have pointed him the way to some of the amazing identities and other mathematical results that he discovered, and would have given him a rather different intuition and “box of tools” than what a more mainstream, theory-based approach to mathematics would give. Still, his talent was exceptionally unusual, and he is one of the few successful mathematicians of the modern era that I would see as a plausible contender for the title of “genius” as the term is popularly used. But the bulk of mathematical progress nowadays comes from more prosaic individual and collaborative mathematical effort – much more Hardy than Ramanujan, so to speak."
There are 2 main articles here that were written specifically on the life and work of Ramanujan:
Who was Ramanujan by Stephen Wolfram
Thoughts on Ramanujan by Paramanand Sigh
They have covered almost everything that needs to be known about the life of Ramanujan. In this article, I only wish to point out certain similarities and differences between Leonard Euler and Ramanujan.
Similarity
Both Euler and Ramanujan possessed powerful memories and massive mental power for calculations. Their skills in manipulating mathematical symbols remain unmatched. Euler was very fond of infinite series and perform all kinds of operations on them, a passion that was shared by Ramanujan. However, Euler was born in the 18th century, and at that time, the theory of convergence of numerical, power and trigonometric series were not very well understood, thoroughly investigated and tightly defined. In the case of Ramanujan, his poverty-stricken background kept him from knowing many latest advances in the theory of infinite series in particular, and in mathematics in general. As such, he obtained some results that would not make sense to the 20th and 21th century mathematicians. Nevertheless, they were both highly skillful in exploiting known boundaries to discover more beautiful and deep identities.
Both Euler and Ramanujan were deeply religious. Euler was a devout protestant who were not concerned much with other issues except for numbers and mathematics. Ramanujan, till the end of his life, was a deeply conservative Hindu, who observed strict diets even though he had fallen ill many times during his stay in Cambridge.
Difference
Euler
Although there was little doubt that Euler was born to be a magnificent mathematician, he was very lucky to be born in a well-connected family. At an early age, Euler was already taken under the wing of Johann Bernoulli, and was close to his sons Daniel and Nicolaus Bernoulli. They were all highly ranked, if not one of the best mathematicians of that century. Needless to say, Euler was tutored by the greatest minds of Europe. This wonderful background of education, coupling with his incredible talent for Mathematics was what would make Euler the master of us all.
Euler was, in many senses, also lucky to born in Europe. He had many chances to maintain contact with other prominent mathematicians of his time, like Joseph Lagrange, the Bernoullis, Fagnano, etc. This means he could keep tab on the latest development of Mathematics and Mathematical Physics. His extensive correspondence portraited him as a man who were knowledgeable of all scientific fields in his days.
Euler was also, due to his talent, accepted into and sheltered by 2 great Academies in Europe, one in Russia, Petropolis (now Saint Petersburg), and one in Berlin. Thus, one could assume that he lived a very comfortable life and did not have to worry about mundane financial matters. It was a very prestigious position, and many mathematicians like de Moivre spent their lives to achieve just that.
Finally, Euler lived a very long life, a long and glorious life that covered almost the whole century that bore his name whenever people talked about XVIII century mathematics. He published 5 textbooks in total: Arithmetic, Elements of Algebra, Introduction to analysis of the infinite, Foundations in differential calculus, Foundations in integral calculus. Apart from all these, his papers published in many journals were all available to general leaders. Historians of mathematics had a lot of materials to research the life and work of this giant.
Ramanujan
In contrast to Euler, Ramanujan was much more unfortunate. He was not born in a well-connected family, was not accepted into any prestigious academy that would provide him good pension, and was not educated by any great mathematicians like Euler. Yet his profound talent had dragged him from the dredge of poverty to the shining summit of learning, when Hardy found ways to let him travel to England.
Ramanujan developed his mathematics in isolation, with little help from outsiders. This placed a cost on his discoveries: many of his results were already known in Europe. Yet, even after taking away these pearls, the rest of his works were still startling and opened new doors for later mathematicians like Bruce C. Berndt.
Ramanujan, unlike Euler, did not have enough materials to write down derivations and proofs for many of his results. What we were left with were only 4 notebooks and few articles. This had led many to falsely assume that Ramanujan did not know the proofs and could just come up with the results. This was unattainable given the fact that his notebooks showed a fragment of the massive number of calculations that he went through. Lacking in money, he wrote down his final results only. Yet, a few demonstrations he showed indicate a very clear and sophisticated method behind all his formulae.
Some interesting infinite series of Ramanujan presented in the letter he sent to Hardy:
$$\sum_{n=1}^{+\infty} \dfrac{\coth(n\pi)}{n^7}=\dfrac{\coth(\pi)}{1^7}+\dfrac{\coth(2\pi)}{2^7}+\dfrac{\coth(3\pi)}{3^7}...=\dfrac{19\pi^7}{56700}$$
This series is divergent. Since:
$$\coth(x)=\dfrac{e^x+e^{-x}}{2}$$
$$\dfrac{\coth(n\pi)}{n^7}=\dfrac{e^{n\pi}+e^{-n\pi}}{2n^7}$$
$\displaystyle\lim_{n\to\infty}\dfrac{e^{-n\pi}}{2n^7}=0$ and $\displaystyle\lim_{n\to\infty}\dfrac{e^{n\pi}}{2n^7}=+\infty$
Thus the series diverge and the sum is not meaningful in ordinary sense.
$$\dfrac{1}{1^5\cosh\left(\dfrac{\pi}{2}\right)}+\dfrac{1}{3^5\cosh\left(\dfrac{3\pi}{2}\right)}+\dfrac{1}{5^5\cosh\left(\dfrac{5\pi}{2}\right)}...=\dfrac{\pi^5}{768}$$
From Littlewood's Miscellany, (page 95, 96):
"Ramanujan great gift is a "formal" one, he dealt in "formulae". To be quite clear what is meant, I give two examples (the second is at random, the first one is of supreme beauty).
$$p(4)+p(9)x+p(14)x^2+...=5\dfrac{[(1-x^5)(1-x^{10})(1-x^{15})...]^5}{[(1-x)^2(1-x^3)(1-x^5)...]^6}$$
where $p(n)$ is the number of partitions of n
$$\int_{0}^{\infty}\dfrac{\cos(\pi x)}{[\Gamma(\alpha+x)][\Gamma(\alpha-x)]^2}dx=\dfrac{1}{4\Gamma(2\alpha-1)[\Gamma(\alpha)]^{2}} \left(\alpha>\dfrac{1}{2}\right)$$
But the great day of formulae seems to be over. No-one, if we are again to take the highest standpoint, seems to be able to discover a radically new type, though Ramanujan comes near in his work of partition series; it is futile to multiply examples in the sphere of Cauchy's theorem and elliptic function theory, and some general theory dominates, if in a less degree, every other field. A hundred years or so ago, his power would have had ample scope. Discoveries alter the general mathematical atmosphere and have very remote effects, and we are not prone to attach great weight to rediscoveries, however independent they seem. How much are we allow for this, how great a mathematician might Ramanujan have been 100 or 150 years ago; and what would have happened if he had come in touch with Euler at the right moment?...