Edge With Decimal Rounded 1 20.645729 21 2 82.582915 83 3 185.81156 186 4 330.33166 330 5 516.14322 516 6 743.24624 743 7 1011.6407 1012 8 1321.3266 1321 9 1672.3040 1672 10 2064.5729 2065 11 2498.1332 2498 12 2972.9849 2973 13 3489.1282 3489 14 4046.5628 4047 15 4645.2890 4645 16 5285.3066 5285 17 5966.6156 5967 18 6689.2161 6689 19 7453.1081 7453 20 8258.2915 8258 21 9104.7664 9105 22 9992.5327 9993 23 10921.591 10922 24 11891.940 11892 25 12903.581 12904 26 13956.513 13957 27 15050.736 15051 28 16186.251 16186 29 17363.058 17363 30 18581.156 18581 31 19840.545 19841 32 21141.226 21141 33 22483.199 22483 34 23866.462 23866 35 25291.018 25291 36 26756.865 26757 37 28264.003 28264 38 29812.432 29812 39 31402.154 31402 40 33033.166 33033 41 34705.470 34705 42 36419.066 36419 43 38173.953 38174 44 39970.131 39970
Friday, 21 August 2026
Surface Area of a Regular Dodecadhedron
Thursday, 25 April 2024
Anti-Magic Squares Revisited
I've written about magic squares before. Here are links to these posts:
- Ultramagic Squares on November 12th 2021
- Prime Semi-Magic Squares on May 17th 2021
- Magic Squares on September 21st 2020
- Anti-Magic Squares on July 17th 2018
A117560 | \( \text{a}(n) = \dfrac {n \cdot (n^2-1)}{2} - 1 \) |
\( \text{a}(n-1) \) is an approximation for the lower bound of the "antimagic constant" of an antimagic square of order \(n\). The antimagic constant here is defined as the least integer in the set of consecutive integers to which the rows, columns and diagonals of the square sum.
![]() |
| Figure 1: source |
The ten sums from a sequence of consecutive numbers, namely 30, 31, 32, 33, 34, 35, 36, 37, 38, 39. Figure 2 shows a different arrangement. Note that OEIS A117560 gives 29 as the lower bound here.
![]() |
| Figure 2: source |
Note that an anti-magic square differs from a so-called heterosquare. As explained in Wolfram Mathworld:
A heterosquare is an \(n \times n\) array of the integers from \(1\) to \(n^2\) such that the rows, columns, and diagonals have different sums. By contrast, in a magic square, they have the same sum. There are no heterosquares of order two, but heterosquares of every odd order exist. They can be constructed by placing consecutive integers in a spiral pattern (Fults 1974, Madachy 1979). An antimagic square is a special case of a heterosquare for which the sums of rows, columns, and main diagonals form a sequence of consecutive integers.
Figure 3 shows an example of a 4 x 4 heterosquare:
![]() |
| Figure 3: source |
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 |
Sunday, 12 February 2023
Kempner Series
I came upon this series quite by accident when investigating what are called Kempner numbers and the Kempner function. Both of these are quite different to the Kempner series defined by Wolfram Mathworld as follows:
A Kempner series \(K_d\) is a series obtained by removing all terms containing a single digit \(d\) from the harmonic series. Surprisingly, while the harmonic series diverges, all 10 Kempner series converge.
The example is given of:$$ K_1= \frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\frac{1}{5}+\frac{1}{6}+\frac{1}{7}+\frac{1}{8}+\frac{1}{9}+\frac{1}{22}+ \dots $$where it can be seen that the fractions 1/1, 1/10, 1/11 etc. have been removed from the harmonic series. In general: $$ \sum_{k=1}^{\infty} \frac{1}{k} \approx 10^n \ln{10}$$when a particular string of length \(n\) is excluded. Thus, when removing the digit 1, the result is about 23.0258509299405. It takes a lot of terms to approach this number. After one million terms, the total is only about 7.717.
Another example is given of removing the string "314" which gives an approximation of 2302.58509299405 (just move the decimal place two to the right) whereas the actual result is closer to 2299.829782. Quite a good approximation. This convergence is surprising given that removing all the composite numbers in the harmonic series still results in its divergence.
So what about Kempner numbers and the Kempner function? The number associated with my diurnal age today, 26978, has a property that qualifies it for inclusion in OEIS A346211:
A346211 | Numbers m such that \( |(K(m+1) - K(m)| = 1\), where \(K(m)\) = A002034(\(m\)) is the Kempner function. |
A002034 | Kempner numbers: smallest positive integer \(m\) such that \(n\) divides \(m\)!. |
The Smarandache function \( \mu(n) \) is the function first considered by Lucas (1883), Neuberg (1887), and Kempner (1918) and subsequently rediscovered by Smarandache (1980) that gives the smallest value for a given n at which \(n|\mu(n)!\) (i.e., \(n\) divides \( \mu(n)\) factorial). For example, the number 8 does not divide 1!, 2!, 3!, but does divide 4!=4·3·2·1=8·3, so \( \mu(8)=4\). This function has the property that it has a highly inconsistent growth rate: it grows linearly on the prime numbers but only grows sublogarithmically at the factorial numbers.
![]() |
Figure 1: link |
Friday, 23 December 2022
Formula for Pi
I have to remind myself from time to time what a fertile source of information is the website Cantor's Paradise. Today, I came across a tweet from the site's Twitter feed that mentioned a particularly interesting formula for \(\pi\) from Ramanujan. See Figure 1.
![]() |
Figure 1: link |
I'll rewrite the formula below for clarity:$$\frac{1}{\pi}=\frac{2\sqrt{2}}{9801} \sum_{n=0}^{\infty} \frac{(4n)! (1103+26390n)}{(n!)^4 396^{4n}}$$Now when \(n=0\), we get$$ \frac{1}{ \pi } \approx \frac{1103 \sqrt{8}}{9801} \text{ and } \pi \approx \frac{9801}{1103 \sqrt{8}} $$Now how accurate is this approximation? Permalink
3.1415926535897932385 ... actual digits of pi to 20 decimal places
3.1415927300133056603 approximated digits of pi when \(n=0\) (first term)
This is a pretty impressive approximation for the first term of an infinite series! As the website says:
This gives the accurate value of \(\pi\) up to 6 decimal places, but this is only the 1st term in another infinite series. This number alone is sufficient to calculate the circumference of the Earth with a maximum error of just 1 meter. It is to be noted that while Ramanujan’s formula takes one formula to calculate up to 6 decimal places, it takes Leibniz about 5 million terms. Ramanujan’s formula could do it in one term though and each successive term adds up another 8 decimal places to the value of Ï€. This formula holds absolutely true for finding the value of Ï€, but there is no clear understanding of how he came up with the numbers in his formula like 9801 and 1103. Mathematicians use this formula today to find the value of Ï€ to an insurmountable extent.
3.1415926535897932385 actual digits of pi to 20 decimal places
3.1415926535897938780 approximated digits of pi when \(n=1\) (first two terms)
So far we've only displayed \( \pi \) to 20 decimal places but with the addition of another term, there is a need for more accuracy. Here's the result of \(n=2\) Permalink:
Saturday, 5 November 2022
The Mediant
The mediant is such a simple concept and yet I can't recall ever having heard of the term before.$$ \begin{align} \text{Given two fractions } \frac{a}{b} \text{ and } \frac{c}{d} \text{ such that } \frac{a}{b}<\frac{c}{d} \text{ then}\\ \text{the mediant is defined as } \frac{a+c}{b+d} \text{ where } \frac{a}{b} < \frac{a+c}{b+d} < \frac{c}{d} \end{align} $$There's a nice visual proof of this inequality to be found on this Mathematical Visual Proofs YouTube channel.
One interesting application of the mediant is a means of finding fractional approximations to irrational and transcendental numbers. I got the idea for this after watching this YouTube video titled Fraction-Finding with the Mediant Method and even though the author uses Python it was not clear what he was doing. However, I grasped what he was on about and wrote my own code. Here is a permalink to it in which I've used \(e\) as an example but any number can be used as a target e.g. \( \pi \) or \( \sqrt{2} \).
The program discards initially the whole number part of the number. So in the case of \(e\), this means discarding 2. What's left is then a decimal number between 0 and 1. We begin by starting with two fractions: one below the number and the other above. If we set \(a=0\) and \(b=1\) and \(c=1\) and \(d=1\) then we know that:$$ \frac{a}{b}=\frac{0}{1}=0 \text{ and } \frac{c}{d}=\frac{1}{1}=1$$are starting points that will always work. The algorithm then generates a new fraction (always 1/2 initially) that may be above or below the (infinite) decimal part of the number that we are trying to approximate. The algorithm ensures that another fraction is always chosen so that it is on the opposite side of the number on the number line. In this way the fractions get closer and closer to the number and the algorithm terminates when the approximation is within a bound that has been set initially.








