The convergence of the infinite sum of inverse squares \(\sum_{n=1}^{\infty}\frac{1}{n^2}\) is typically taught to undergraduate mathematicians in their first year mathematical analysis courses, often by bounding above by the geometric series \(\sum_{n=0}^{\infty}\frac{1}{2^n}=2\), and is compared with the divergence of the harmonic series \(\sum_{n=1}^{\infty}\frac{1}{n}\).
The limit \(\sum_{n=1}^{\infty}\frac{1}{n^2}=\frac{\pi^2}{6}\) is given as a well-known fact (along with the infinite sum of reciprocal fourth powers \(\sum_{n=1}^{\infty}\frac{1}{n^4}=\frac{\pi^4}{90}\)), though the problem of finding and proving this limit dates back to 1650 and was famously solved by Leonhard Euler in 1734, earning itself the name the Basel problem.
In doing some background research on a programming exercise whilst preparing to lead a computer lab session, I stumbled across the Wikipedia page for the Basel problem, which gives a brief history of the problem along with a number of different methods of proof. More alternative proofs have been gathered by Robin Chapman as well as by the users of MathStackExchange.
The programming exercise in question involves writing a script/function to compute the partial sums
\[\sum_{i=1}^{n}\frac{1}{i^4} = \frac{1}{1^4} + \frac{1}{2^4} + \ldots + \frac{1}{n^4}\]
for any given choice of $n$ and observe its properties as $n$ increases.
The code cell below allows the user to choose values $N$ and $s$ and plots the values of the partial sums \(S_{n}:=\sum_{i=1}^{n}\frac{1}{i^s}\) for \(n=1,\ldots,N\) and compares them with the limits \(\zeta(s) := \sum_{n=1}^{\infty}\frac{1}{n^s}\) using the Riemann zeta function from the SciPy package.
A further discussion on MathStackExchange considers proofs of the limit \(\sum_{n=1}^{\infty}\frac{1}{n^4}=\frac{\pi^4}{90}\).
An interesting generalization discussed on the Wikipedia page for the Basel problem and in the other references is the relation between values of the Riemann zeta function and the Bernoulli numbers for positive even integers.
Therefore, it was very interesting for me to dig deeper into the history and details of this classical problem which relates mathematical analysis and number theory, with proofs applying techniques of varying levels of sophistication that one might encounter whilst studying for a degree in mathematics.