Showing posts with label irrational. Show all posts
Showing posts with label irrational. Show all posts

Monday, 1 June 2026

Beatty's Theorem

This video on Beatty's Theorem by Euclidia is very interesting and very surprising. It shows that the integers can be split into two disjoint sets using an irrational number of your choice provided it is greater than 1. Each pair is unique to the irrational number being used. The two infinite sets cover the entire range of positive integers.


It's extremely easy to generate the two sequences using the following SageMath code. Here, using \( \sqrt{2} \), I've generated the first 25 terms of each sequence:

a=sqrt(2)
b=a/(a-1)
A,B=[],[]
for n in [1..25]:
    A.append(floor(n*a))
    B.append(floor(n*b))
print(A)
print(B)

[1, 2, 4, 5, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 24, 25, 26, 28, 29, 31, 32, 33, 35]
[3, 6, 10, 13, 17, 20, 23, 27, 30, 34, 37, 40, 44, 47, 51, 54, 58, 61, 64, 68, 71, 75, 78, 81, 85] 

Using different values of \(a\) such as \( \pi \) or \(e\) yields different disjoint sets:

\( \pi\) yields the following sequences:

[3, 6, 9, 12, 15, 18, 21, 25, 28, 31, 34, 37, 40, 43, 47, 50, 53, 56, 59, 62, 65, 69, 72, 75, 78]
[1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 24, 26, 27, 29, 30, 32, 33, 35, 36]

\(e\) yields the following sequences:

[2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29, 32, 35, 38, 40, 43, 46, 48, 51, 54, 57, 59, 62, 65, 67]
[1, 3, 4, 6, 7, 9, 11, 12, 14, 15, 17, 18, 20, 22, 23, 25, 26, 28, 30, 31, 33, 34, 36, 37, 39]

INTERACTIVE LINK


Here a link to an interactive report that Gemini created regarding Beatty's sequences. I struggled to get this to work in Blogger but by using this external link, it all worked fine. Something to remember in the future.

Friday, 3 March 2023

Irrational Number Approximations by Egyptian Fractions

I've written about Egyptian fractions before in a post titled The Greedy Algorithm on the 2nd August 2020. However, this post deals with ways of representing proper fractions, like 5/7, as Egyptian fractions. How do we approximate an irrational number such as \(\pi\) by Egyptian fractions?

The question arose because the number associated with my diurnal age today, 26997, has a property that qualifies for admission in OEIS A132556:


 A132556

Egyptian fraction representation for the cube root of 82.  

In the case of \(82^{1/3}\) one obvious way of achieving this is to first get the initial digits of its digital representation. We find that:$$82^{1/3} \approx 4.3444814857686119017$$This means that the proper fraction to convert into an Egyptian fraction is:$$\frac{3444814857686119017}{10000000000000000000}$$Taking this fraction and using this algorithm, we find that:$$82^{1/3} \approx 4+\frac{1}{3}+ \frac{1}{90}+ \frac{1}{26997} +  \frac{1}{5832713646}+ \dots$$These initial fractions are in agreement with the OEIS output but subsequent ones are not. Of course, while the Egyptian fractions were ideally suited to the purposes for which the Egyptians put them, they were never intended as approximations for irrational numbers of whose existence they were oblivious.

Egyptian fraction representations are not unique and especially so when dealing with approximations of irrational numbers. The Engels expansion is an alternative and thus we have:$$82^{1/3} \approx 4+ \frac{1}{3}+ \frac{1}{90}+ \frac{1}{27000}+ \frac{1}{233280000} + \dots$$The best rational approximations for irrational numbers remain the progressive approximations afforded by the number's continued fraction. In case of the cube root of 82 we have the following progressive approximations:$$\frac{9}{2},\frac{ 13}{3}, \frac{126}{29}, \frac{391}{90}, \frac{ 1299}{299}, \frac{ 121198}{27897}, \frac{ 486091}{111887},\frac{ 2065562}{475445}$$Figure 1 shows an interesting and relevant response to the Quora question: Is there any pattern in the Egyptian fraction representation of Pi?


Figure 1

Monday, 21 December 2020

Continued Fractions of Square Roots

It's all too easy, using online resources like WolframAlpha or SageMathCell, to extract a variety of information about continued fractions. For example, today I turned \(26195\) days old and this number is a member of OEIS A042431:


  A042431

Denominators of continued fraction convergents to \( \sqrt{743} \).   



To confirm that \(26195\) is indeed a member of this sequence, I would normally use SageMathCell but others would turn to WolframAlpha and, using the latter, it can be seen in Figure 1 that \(26195\) is indeed a denominator in one of the convergent fractions, specifically:$$ \displaystyle \frac{714024}{26195}$$

Figure 1

It's easy to take for granted that the continued fraction of an irrational number that is a square root (like \( \sqrt{743} \)) is always periodic. A good explanation of why this is so can be found on this site. In the following, I'm reproducing the site's conversion of \( \sqrt{5} \) to a continued fraction (and practising my LaTeX at the same time).
$$\begin{aligned}
\sqrt{5}&=2+x\\
5&=(2+x)^2 \\
&=4+4x+x^2\\
&=4+x\,(4+x)\\
5-4&=x\,(4+x)\\
1&=x\,(4+x)\\
x&=\frac{1}{4+x}\\
\text{ Thus } \sqrt{5}&=2+\frac{1}{4+x}\\
&=2+\frac{1}{4+\displaystyle \frac{1}{4+x}}\\
&=2+\frac{1}{4+\displaystyle \frac{1}{4+\displaystyle \frac{1}{4+x}}} \text{ etc.}\\
\end{aligned}$$Clearly, we can write \( \sqrt{5}=[2;\overline 4]\) where the overline represents repetition. In the case of \( \sqrt{743}\), we have \([27;\overline{3,1,7,27,7, 1, 3, 54}]\). The site referred to earlier goes on to develop a general algorithm for determining the periodic continued fraction of any irrational square root. The table at the end of this post lists the continued fractions of the square roots of the first 99 natural numbers (even those that aren't irrational). 

√n[ a; Period ]
√1[ 1; ]
√2[ 1; 2 ]
√3[ 1; 1, 2 ]
√4[ 2; ]
√5[ 2; 4 ]
√6[ 2; 2, 4 ]
√7[ 2; 1, 1, 1, 4 ]
√8[ 2; 1, 4 ]
√9[ 3; ]
√10[ 3; 6 ]
√11[ 3; 3, 6 ]
√12[ 3; 2, 6 ]
√13[ 3; 1, 1, 1, 1, 6 ]
√14[ 3; 1, 2, 1, 6 ]
√15[ 3; 1, 6 ]
√16[ 4; ]
√17[ 4; 8 ]
√18[ 4; 4, 8 ]
√19[ 4; 2, 1, 3, 1, 2, 8 ]
√20[ 4; 2, 8 ]
√21[ 4; 1, 1, 2, 1, 1, 8 ]
√22[ 4; 1, 2, 4, 2, 1, 8 ]
√23[ 4; 1, 3, 1, 8 ]
√24[ 4; 1, 8 ]
√25[ 5; ]
√26[ 5; 10 ]
√27[ 5; 5, 10 ]
√28[ 5; 3, 2, 3, 10 ]
√29[ 5; 2, 1, 1, 2, 10 ]
√30[ 5; 2, 10 ]
√31[ 5; 1, 1, 3, 5, 3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, 16 ]
√76[ 8; 1, 2, 1, 1, 5, 4, 5, 1, 1, 2, 1, 16 ]
√77[ 8; 1, 3, 2, 3, 1, 16 ]
√78[ 8; 1, 4, 1, 16 ]
√79[ 8; 1, 7, 1, 16 ]
√80[ 8; 1, 16 ]
√81[ 9; ]
√82[ 9; 18 ]
√83[ 9; 9, 18 ]
√84[ 9; 6, 18 ]
√85[ 9; 4, 1, 1, 4, 18 ]
√86[ 9; 3, 1, 1, 1, 8, 1, 1, 1, 3, 18 ]
√87[ 9; 3, 18 ]
√88[ 9; 2, 1, 1, 1, 2, 18 ]
√89[ 9; 2, 3, 3, 2, 18 ]
√90[ 9; 2, 18 ]
√91[ 9; 1, 1, 5, 1, 5, 1, 1, 18 ]
√92[ 9; 1, 1, 2, 4, 2, 1, 1, 18 ]
√93[ 9; 1, 1, 1, 4, 6, 4, 1, 1, 1, 18 ]
√94[ 9; 1, 2, 3, 1, 1, 5, 1, 8, 1, 5, 1, 1, 3, 2, 1, 18 ]
√95[ 9; 1, 2, 1, 18 ]
√96[ 9; 1, 3, 1, 18 ]
√97[ 9; 1, 5, 1, 1, 1, 1, 1, 1, 5, 1, 18 ]
√98[ 9; 1, 8, 1, 18 ]
√99[ 9; 1, 18 ]

Friday, 8 March 2019

Vishwanath Number

I came across this interesting number in a book I was reading on Mathematics. To quote from pages 97 and 98 of The Story of Numbers by Mallick Asok Kumar:
This, almost certainly, irrational number has been discovered recently by an Indian computer scientist — named Divakar Vishwanath. This number is related to “Randomised Fibonacci Sequence”. Just like the normal Fibonacci sequence (see Section 2.6.1), the randomised version also starts with first two numbers as 1, 1. Thereafter one tosses a fair coin at every stage and use the following formula to generate the sequence:$$F_n=F_{n−2}±F_{n−1} \text{ for }n≥3$$The plus sign is used if the coin shows a head and the minus sign is used if the coin shows a tail. Vishwanath has proved that if you start to generate such avsequence, then, with probability 1, the absolute value of the \(N\)-th number in the randomised sequence will be approximately equal to the \(N\)-th power of 1.13198824 . . . . The bigger the value of \(N\), the closer is the absolute value of the \(N\)-th number of the randomised sequence to the \(N\)-th power of Vishwanath number 1.13198824 . . . . This number is almost certainly an irrational number.
Bear in mind that the recent discovery referred to in the above quote is now about twenty years old. Using SageMathCell, I tested this out for N=1000. Here is the code that I used:


The above box sometimes works but is temperamental. Here is a permalink to the code at SageMathCell. Some results are as follows (note that even though the \(N\)-th term can be very large, the \(N\)-th root of the number always reins it in:

71635048983737736457508495785347136900241837532880818653 1.13724785289546
-3868701952168426630626609949500693480141855962812452339 1.13393344608014
-230368470580308360353351991114643286077160535687 1.11522481150615
-1294461166539244845628908128250544767526170899091979974739663 1.14844999189994


Increasing \(N\) to 100,000 gives the following results:
  • 1.13104709702409
  • 1.13203489558527
  • 1.12848774540983
  • 1.13268434714159
Increasing \(N\) to 500,000 gives the following results:
  • 1.13181606331044
  • 1.13153973067764
  • 1.1312382520834
  • 1.13181595957100
Thus we see that, as \(N\) increases, the values draw closer to 1.13198824 . . . While the Vishwanath Number is "almost certainly an irrational number", one wonders whether or not it is a transcendental number. There's a more details report from March 1999 on this constant here and here is a quote in part from report:
To give some idea of what this result says, the way the randomized Fibonacci sequence is generated is a bit like the daily weather at a particular location. Today's weather can be assumed to depend on the weather the previous two days, but there is a large element of chance. The analog of the number 1.13198824 . . . for the weather would give a quantitative measure of the unpredictability of weather. It measures the rate at which small disturbances explode exponentially in time. It would tell you for exactly how many days high-speed computers can forecast weather reliably. Unfortunately, nobody knows this number for global weather, and probably never will. 
Viswanath's result brings to an end a puzzle that has its origins in 1960. In that year, Hillel Furstenberg (now at the Hebrew University) and Harry Kesten (at Cornell University) showed that for a general class of random-sequence generating processes that includes the random Fibonacci sequence, the absolute value of the \(N\)-th member of the sequence will, with probability 1, get closer to the \(N\)-th power of some fixed number. (The exact formulation of their result is in terms of random matrix products, and is not for the faint-hearted. See Viswanath's paper -- cited below -- for an exact statement, or read the whole story in the book Random Products of Matrices With Applications to Infinite-Dimensional Schrodinger Operators, by P. Bougerol and J. Lacroix, published by Birkhauser, Basel, in 1984.) 
Since Furstenberg and Kesten's deep result applied to the randomized Fibonacci process, it followed that, with probability 1, the absolute value of the Nth number in any random Fibonacci sequence will get closer and closer to the Nth power of some fixed number K. But no one knew the value of the number K, or even how to calculate it. 
What Viswanath did was find a way to compute \(K\). At least, he computed the first eight decimal places. Almost certainly, \(K\) is irrational, so cannot be computed exactly. Viswanath presented his new result at a colloquium at MSRI last month. 
Since there is no known algorithm to compute \(K\), Viswanath had to adopt a circuitous route, showing that \(K\) equals \(e^P\), where \(P\) lies somewhere between 0.1239755980 and 0.1239755995 (and, as usual, \(e\) is the base for natural logarithms). Since those two numbers are equal in their first eight decimal places, that meant he could calculate \(K\) to eight decimal places. 
The process involved large doses of mathematics and some heavy duty computing. Since his computation made use of floating point arithmetic -- which is not exact -- Viswanath had to carry out a detailed mathematical analysis to obtain an upper bound on any possible errors in the computation. He describes the key to his new result this way: "The problem was that fractals were coming in the way of an exact analysis. What I did was to guess the fractal and use it to find \(K\). To do this, I made use of some devilishly clever work carried out by Furstenberg in the early 1960s." 
And with that computation, mathematics has a new constant, a direct descendent of a pair of rabbits in thirteenth century Italy.
There's not been much on the Internet about Vishwanath's Number over the subsequent twenty years. The number did get a brief mention in another blog last year but that's about it. Nonetheless, it's an interesting concept.

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 $$