Showing posts with label geometric mean. Show all posts
Showing posts with label geometric mean. Show all posts

Friday, 11 February 2022

Khinchin's Constant

As I said in my previous post, Twin Prime Constant, the following standard mathematical constants are defined in SageMath:
  • pi
  • golden_ratio
  • log2
  • euler_gamma
  • catalan
  • khinchin
  • twinprime
  • mertens
I'm familiar with all the constants above except two: the twinprime constant and the khinchin constant. I've dealt with the former and so this post is about the latter. To quote from Wikipedia:
Aleksandr Yakovlevich Khinchin proved that for almost all real numbers \(x\), coefficients \(a_i\) of the continued fraction expansion of \(x\) have a finite geometric mean that is independent of the value of \(x\) and is known as ''Khinchin's constant''. That is, for$$x = a_0+\cfrac{1}{a_1+\cfrac{1}{a_2+\cfrac{1}{a_3+\cfrac{1}{\ddots}}}}$$it is almost always true that$$\lim_{n \rightarrow \infty } \left( a_1 a_2 ... a_n \right) ^{1/n} = K_0$$where \(K_0\) is Khinchin's constant which is equal to$$\prod_{r=1}^\infty {\left( 1+{1\over r(r+2)}\right)}^{\log_2 r}  \approx 2.6854520010\dots$$Although almost all numbers satisfy this property, it has not been proven for ''any'' real number ''not'' specifically constructed for the purpose. Among the numbers \(x\) whose continued fraction expansions are known ''not'' to have this property are rational numbers, roots of quadratic equations (including the golden ratio, the square roots of integers) and the base of the natural logarithm \(e\).

\( \pi \), the Euler–Mascheroni constant \( \gamma \), and Khinchin's constant itself, based on numerical evidence, are thought to be among the numbers whose geometric mean of the coefficients \(a_i\) in their continued fraction expansion tends to Khinchin's constant. However, none of these limits have been rigorously established. It is not known whether Khinchin's constant is a rational, algebraic irrational or transcendental number.
Let's look at Wolfram MathWorld's article on the Euler-Mascheroni Constant Continued Fraction in which the continued fraction for \( \gamma \) is given as:

[0; 1, 1, 2, 1, 2, 1, 4, 3, 13, 5, 1, 1, 8, 1, 2, 4, 1, 1, 40, ...] (OEIS A002852)

SageMathCell (permalink) can display what this continued fraction looks like. See Figure 1.

Figure 1: permalink

Figure 2 shows a plot of the progressive harmonic means of successive values of \(a_1^{1/1}, (a_1.a_2)^{1/2}, (a_1.a_2...a_n)^{1/n} \) that appear to approach Khinchin's constant, although this has not been rigorously proven:

Figure 2: source

Figure 2 shows a rather more complicated plot of the values \( (a_1.a_2,...,a_n)^{1/n} \) for \(n\)=1 to 500 and \(x=\pi, \sin 1\), the Euler-Mascheroni constant \( \gamma\), and the Copeland-Erdős constant \(C\). The horizontal line marked \(K\) in the plot is Khinchin's constant.

Figure 2: source

I've mentioned the geometric mean briefly in posts titled Root-Mean-Square And Other Means on September 13th 2020 and Reciprocals of Primes on October 30th 2021. This mean is one of the three Pythagorean means along with the arithmetic and harmonic. I definitely need to dedicate a post to these three means.

Saturday, 12 September 2020

Root-Mean-Square And Other Means

Today I turned 26095 days old and this number happens to be a so-called RMS number where RMS stands for Root-Mean-Square. Such numbers are defined by OEIS A140480 as numbers \(n\) such that root mean square of divisors of \(n\) is an integer. Now the root mean square of divisors is defined by MathWorld as:

For a set of \(n\) numbers or values of a discrete distribution \(x_i, ..., x_n\), the root-mean-square (abbreviated "RMS" and sometimes called the quadratic mean), is the square root of mean of the values \(x_i^2\), namely:$$x_{RMS}=\sqrt{\frac{x_1^2+x_2^2+...+x_n^2}{n}}=\sqrt{\dfrac{\sum \limits_{i=1}^n x_i^2}{n}}$$For a variate \(\chi\) from a continuous distribution \(P(x)\), we have:$$x_{RMS}=\sqrt{ \frac{\int[P(x)]^2 dx}{\int P(x) \,dx}}$$where the integrals are taken over the domain of the distribution. Similarly, for a function \(f(t)\) periodic over the interval \([T_1,T_2]\), the root-mean-square is defined as:$$f_{RMS}=\sqrt{\frac{1}{T_2-T_1}\int_{T_1}^{T_2} [f(t)]^2 dt}$$

The sequence to which 26095 belongs runs 1, 7, 41, 239, 287, 1673, 3055, 6665, 9545, 9799, 9855, 21385, 26095, ... with 7, 41 and 239 being prime and the next prime being 9369319. Such primes are known as NSW primes, after Newman, Shanks, and Williams (the authors of a paper on the subject back in 1981). If we designate \(n\) to be such a prime number, then \(n\) has 2 divisors \([1, n]\) and we have to solve Pell's equation \(n^2 = 2*C^2 - 1\) where \(C\) is a positive integer. The solution is a prime \(n\) of the form \(u_i = 6u_{i-1} - u_{i-2} \), where \(i \geq 2, u_0=1, u_1=7\). These primes are listed in OEIS A088165.

There are of course many other types of means including arithmetic, geometric, harmonic, Pythagorean, power, Heronian, Identric, population, Chisini, Stolarsky, Lehmer, weighted and so on. The arithmetic mean is certainly the best known and most widely used but the root-mean-square has many applications in scientific circles. I've encountered the root-mean-square before in the context of the root-mean-square-error (see Figure 1).


Figure 1

A regression line is a line drawn such that the RMSE is minimised (see Figure 2).

Figure 2

The root-mean-square is a particular instance of a more generalised power mean defined as:$$M_p(a_1, a_2, ..., a_n) \equiv \bigg( \frac{1}{n} \sum_{k=1}^n a_k^{\,p} \bigg)^{1/p} $$where the parameter \(p\) is an affinely extended real number and all \(a_k \geq 0\). A power mean is also known as a generalized mean, Hölder mean, or mean of degree (or order or power) \(p\). The case of \(p=1\) is the arithmetic mean and the case of \(p=2\) is the root-mean-square. 

Figure 3 shows a summary of a few particular values of \(p\) that yield special cases with their own names (source):

Figure 3

The three "classic" means \(A\) (the arithmetic mean), \(G\) (the geometric mean), and \(H\) (the harmonic mean) are sometimes known as the Pythagorean means. Figure 4 shows how these means on two elements \(a\) and \(b\) could be constructed geometrically, and also demonstrates that \(H \leq G \leq A\).


Figure 4: source