Showing posts with label Riemann zeta function. Show all posts
Showing posts with label Riemann zeta function. Show all posts

Tuesday, 26 November 2024

Probability of Two Random Integers Being Coprime

What is the probability that two integers, chosen at random, are coprime or relatively prime. In other words, they don't have any factors in common. Let's designate the random integers as \(m\) and \(n\). Let's consider a random prime \(p\). The probability that \(p\) divides \(m\) is \(1/p\) and the probability that \(p\) divides \(n\) is also \(1/p\). Therefore the probability that \(p\) will NOT divide \(m\) or \(n\) is \(1-1/p^2\). We have only considered one prime however, and need to take them all into account. So the probability that \(m\) and \(n\) have no prime factors in common is given by the following formula where \(p_i\) represents the \(p\)-th prime:$$\prod_{i=2}^{\infty} \Big (1-\frac{1}{p_i^2} \Big )= \Big (1-\frac{1}{2^2} \Big ) \Big (1-\frac{1}{3^2} \Big ) \Big ( 1-\frac{1}{5^2} \Big )\dots $$We can evaluate this using the sum of the reciprocals of all the integers squared:$$\sum_{n=1}^{\infty} \frac{1}{n^2} = 1 +\frac{1}{2^2}+\frac{1}{3^2} +\frac{1}{4^2} + \dots$$where \(n\) represents the \(n\)-th integer and where we have:$$\sum_{n=1}^{\infty} \frac{1}{n^2} \times \prod_{i=2}^{\infty} \frac{1}{p_i^2} =1$$The derivation of the above relationship is explained well in this video. However, we know that:$$\sum_{n=1}^{\infty} \frac{1}{n^2} =\zeta(2)=\frac{\pi^2}{6}$$and so$$ \begin{align} \prod_{i=2}^{\infty} \Big (1- \frac{1}{p_i^2} \Big ) &= \frac{6}{\pi^2}\\ &\approx 0.6079271 \dots \end{align}$$Thus the probability that two positive integers chosen at random are coprime is about 61%. It's easy to simulate this on a computer to test out its validity (permalink). See Figure 1.


Figure 1

Saturday, 6 June 2020

The Catalan Constant

Today I turned 25977 days old and this number is prime. One of its claims to fame is that it is a member of OEIS A104919:


A104919

Primes from merging of 5 successive digits in decimal expansion of Catalan's constant.


I was familiar with Catalan numbers and in fact posted about them in this post from the 30th of September 2015 and another post from the 15th of April 2018. These numbers, and the eponymous constant, are named in honour of the Belgium mathematician Eugène Catalan. So what is the Catalan constant? It is defined as follows:$$\sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n+1)^3} = \frac{1}{1^3} - \frac{1}{3^3} + \frac{1}{5^3} - \frac{1}{7^3} + \frac{1}{9^3} - \cdots$$It is equal to 0.915965594177219015054603514932384110774 ... but the interesting thing is that no one knows whether it is irrational and, if it is, whether it is transcendental. This is odd because a similar looking sequence is known to be transcendental viz.:$$\sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n+1)^3} = \frac{1}{1^3} - \frac{1}{3^3} + \frac{1}{5^3} - \frac{1}{7^3} + \frac{1}{9^3} - \cdots = \frac{\pi^3}{32}$$As of July 16th 2019, the Catalan constant is known to 600,000,000,100 decimal places. This site lists the constant to 300,000 decimal places with the introduction:
Catalan constant to 300000 digits computed on September 29, 1996 by using a Sun Ultra-Sparc in 1 day 8 hour 15 min 15 sec 55 hsec. The algorithm used is the standard series for Catalan, accelerated by an Euler transform. The algorithm was implemented using the LiDIA library for computational number theory and it is part of the multiprecision floating-point arithmetic of the package.
This number of decimal places was the record for 1996 and it was more than sufficient for me to generate the OEIS sequence A104919 up to and including 25997. I simply copied a few thousand of the first few digits into a list and applied the SageMath algorithm shown in this permalink.

Of course, the digits can be generated using a wide variety of formulae. One of the best is the following: $$\frac{\pi}{8}\log\left(2 + \sqrt{3}\right) + \frac{3}{8}\sum_{n=0}^\infty \frac{1}{(2n+1)^2 \binom{2n}{n}}$$I tried this but wasn't successful in generating more than the first two members of the sequence so I abandoned this approach and copied and pasted instead! I'm always fascinated by these types of sequences because of their similarity to the famous Riemann zeta function:$$\zeta(s) =\sum_{n=1}^\infty\frac{1}{n^s}$$In fact the summation that generates the Catalan constant is the Dirichlet beta function (also known as the Catalan beta function) and it is closely related to the Riemann zeta function. It is defined as:$$\beta(s) = \sum_{n=0}^\infty \frac{(-1)^n} {(2n+1)^s}$$When \(s=2\), \( \beta(2)\) gives the Catalan constant. You can read more here about the Dirichlet beta function.

Thursday, 17 January 2019

The Golden Key


Figure 1: this is the book that mentions the
Golden Key, a description of its contents is
included at the end of this post

The sets of infinite natural numbers and infinite prime numbers are related by a formula given by Euler, which, famously known as the Golden Key, is given by:$$

\prod_{ p} \frac{1}{1-\displaystyle \frac{1}{p^{\,s}}}=\sum_n \frac{1}{n^{\, s}} \text{ where } s>1

$$where the left-hand-side products are carried over all the prime numbers \(p\) and the right-hand-side sum is carried over all the natural numbers \(n\).

For the range of numbers from 1 to 100,000 (with \(k\)=100,000), the results are as follows:$$
\prod_{p=2}^k \frac{1}{1-\displaystyle \frac{1}{p^{\, s}}}=1.64493274720203 \text{ and } \sum_{n=1} ^{k} \frac{1}{n^s}=1.64492406679823

$$The right hand side of Euler's formula is of course the Riemann Zeta function and so the equation can be rewritten as:$$

\zeta(s)=\sum_{n \geq 1}n^{-s}=\prod_p (1-p^{-s})^{-1}

$$
Figure 2
which is an easier form to remember (s can be any complex number with s>1). The relationship at first seems strange, linking as it does a sum involving the reciprocals of the natural numbers and a product involving the reciprocals of the prime numbers. However, as this blog post points out, the formula is nothing but a fancy way of writing out the Sieve of Eratosthenes. The post goes on to derive the formula. I've just taken a screenshot of the working (Figure 2) rather than type it all out using LaTeX (lazy I know). In fact, this post is only the first in a long series of posts (from September 2013 to May 2017) dealing with Understanding the Riemann Hypothesis.

I came across the Golden Key when perusing Kumar Asok Mallik's book The Story of Numbers during his introduction to prime numbers on page 23. This is quite an interesting book that I've added to my Calibre library. The description of the book in the metadata is as follows:
This book is more than a mathematics textbook. It discusses various kinds of numbers and curious interconnections between them. Without getting into hardcore and difficult mathematical technicalities, the book lucidly introduces all kinds of numbers that mathematicians have created. Interesting anecdotes involving great mathematicians and their marvellous creations are included. The reader will get a glimpse of the thought process behind the invention of new mathematics. 
Starting from natural numbers, the book discusses integers, real numbers, imaginary and complex numbers and some special numbers like quaternions, dual numbers and p-adic numbers. Real numbers include rational, irrational and transcendental numbers. Iterations on real numbers are shown to throw up some unexpected behaviour, which has given rise to the new science of "Chaos". Special numbers like e, pi, golden ratio, Euler's constant, Gauss's constant, amongst others, are discussed in great detail.The origin of imaginary numbers and the use of complex numbers constitute the next topic. 
It is shown why modern mathematics cannot even be imagined without imaginary numbers. Iterations on complex numbers are shown to generate a new mathematical object called 'Fractal', which is ubiquitous in nature. Finally, some very special numbers, not mentioned in the usual textbooks, and their applications, are introduced at an elementary level.The level of mathematics discussed in this book is easily accessible to young adults interested in mathematics, high school students, and adults having some interest in basic mathematics. The book concentrates more on the story than on rigorous mathematics.
If I can read an entry a day from this book, I'll soon be a wiser man mathematically. Here is a link to a very useful series of slides explaining the importance of the Riemann zeta function and also mentioning the Golden Key.
on January 16th 2021
mainly improving the look of the mathematical expressions


Monday, 3 September 2018

Apéry's Constant

Today I turned 25355 days old and this number turns up in the Engel expansion of \( \zeta(3) \). Firstly however, let's remind ourselves that \( \zeta \) is the Riemann zeta function and can be expressed as:$$ \zeta(3)=\sum_1^{\infty} \frac{1}{n^3} $$ $$ \text{or  } \zeta(3)=\lim_{n \rightarrow \infty} \left( \frac{1}{1^3}+\frac{1}{2^3}+ \cdots + \frac{1}{n^3} \right) $$This works out to around 1.202056903159594285399738161511449990764986292 and is known as Apèry's constant. I've written about this constant before in a post titled The Basel Problem and Beyond on May 7th 2017. According to Wikipedia:
This constant arises naturally in a number of physical problems, including in the second-and third-order terms of the electron's gyromagnetic ratio using quantum electrodynamics. It also arises in the analysis of random minimum spanning trees and in conjunction with the gamma function when solving certain integrals involving exponential functions in a quotient which appear occasionally in physics, for instance when evaluating the two-dimensional case of the Debye model and the Stefan–Boltzmann law.
This doesn't mean much to me but there you have it. As for the Engel expansion, I made a blog post about it in 2016. The expansion consists of the terms that go to make up the denominators of the fractions that when added will approximate \( \zeta(3) \). OEIS A053980 lists the first few terms as: 1, 5, 98, 127, 923, 5474, 16490, 25355


 A053980

Engel expansion of zeta(3) = 1.20206...                              


This means that \( \zeta(3) \) can be approximated as:$$ \zeta(3) \approx \frac{1}{1}+\frac{1}{1 \times 5} +\frac{1}{1 \times 5 \times 98}+\frac{1}{1 \times 5 \times 98 \times 127} +\frac{1}{1 \times 5 \times 98 \times 127} + \cdots $$Of course, once the zeta function is touched upon, one can find oneself in very deep water very quickly so I'm not going to say too much more except to include a screenshot (Figure 1) from Wolfram MathWorld showing the Engel expansions for some of the other constants:


Figure 1

The SAGE code for generating these sequences is fairly straightforward. Figure 2 shows what's involved for Apèry's constant:


Figure 2: permalink

Of course, simply replacing u in the above code by say \(e\) or \(\pi \) will produce the associated Engel expansion.

on May 12th 2021

Sunday, 7 May 2017

The Basel Problem and Beyond

The Basel Problem asks for the exact sum, in closed form, of the summation:$$\sum_{n=1}^\infty \frac{1}{n^2} = \frac{1}{1^2} + \frac{1}{2^2} + \frac{1}{3^2} + \cdots + \frac{1}{n^2} + \cdots$$Leonhard Euler proved that the sum was \( \dfrac{\pi}{6}\) and the details of Euler's proof and other proofs can be found here. Euler of course went further and generalised his investigation to include:$$\zeta(s) =\sum_{n=1}^\infty\frac{1}{n^s}$$ This is the Riemann zeta function or Euler–Riemann zeta function \(\zeta(s)\) which is a function of the complex variable \(s\). In this post, I'll focus on the case where \(s=3\) and look at the exact value of the Riemann zeta function for this value:$$\begin{align}\zeta(3) &= \sum_{n=1}^\infty\frac{1}{n^3} \\&= \lim_{n \to \infty}\left(\frac{1}{1^3} + \frac{1}{2^3} + \cdots + \frac{1}{n^3}\right)\end{align}$$The value of this summation is called Apéry's constant. \(\zeta(3)\) was so named because of the French mathematician, Roger Apéry, who proved in 1978 that it is an irrational number. Here is an interesting Numberphile video about this mathematician's proof:



Up to the present time however, Apéry's constant has not been proven to be transcendental. There are many interesting ways of calculating the value of this constant. Two are shown below and taken from the Wikipedia article about the constant:$$\zeta(3) =\frac{1}{2}\int_0^\infty \frac{x^2}{e^x-1}\, dx $$
$$\zeta(3) =\frac{2}{3}\int_0^\infty \frac{x^2}{e^x+1}\, dx $$

Sunday, 11 December 2016

Riemann Zeta Function and Analytic Continuation

This is a great video that I came across about the Riemann zeta function and analytic continuation.



WolframAlpha explains analytic continuation as follows:
Analytic continuation (sometimes called simply "continuation") provides a way of extending the domain over which a complex function is defined. The most common application is to a complex analytic function determined near a point z_0 by a power series:
Such a power series expansion is in general valid only within its radius of convergence. However, under fortunate circumstances (that are very fortunately also rather common!), the function f will have a power series expansion that is valid within a larger-than-expected radius of convergence, and this power series can be used to define the function outside its original domain of definition. This allows, for example, the natural extension of the definition trigonometric, exponential, logarithmic, power, and hyperbolic functions from the real line R to the entire complex plane C.