Showing posts with label fractions. Show all posts
Showing posts with label fractions. Show all posts

Friday, 29 November 2024

Farey Fractions

The number associated with my diurnal age today is 27634 and one its properties qualifies for membership in OEIS A119015:


A119015
: denominators of "Farey fraction" approximations to \(e\).

I couldn't understand the explanation in the OEIS comments about how these fractions were formed but an investigation of the number in this blog revealed that I'd already dealt with these types of fractions as applied to \(e\) before in a post titled The Mediant on the 5th November 2022. The explanation in that post is much easier to understand but in it I'd only considered the fractions themselves and not their numerators and denominators considered separately, as part of different sequences. The denominator sequence is linked above and here is the corresponding sequence for the numerators:


A119014: numerators of "Farey fraction" approximations to \(e\).

Here are the fractions again (permalink):

5/2, 8/3, 11/4, 19/7, 30/11, 49/18, 68/25, 87/32, 106/39, 193/71, 299/110, 492/181, 685/252, 878/323, 1071/394, 1264/465, 1457/536, 2721/1001, 4178/1537, 6899/2538, 9620/3539, 12341/4540, 15062/5541, 17783/6542, 20504/7543, 23225/8544, 25946/9545, 49171/18089, 75117/27634, 124288/45723, 173459/63812, 222630/81901, 271801/99990, 320972/118079, 370143/136168, 419314/154257, 468485/172346, 517656/190435, 566827/208524, 1084483/398959

Here are the Farey fraction denominators (permalink):

2, 3, 4, 7, 11, 18, 25, 32, 39, 71, 110, 181, 252, 323, 394, 465, 536, 1001, 1537, 2538, 3539, 4540, 5541, 6542, 7543, 8544, 9545, 18089, 27634, 45723, 63812, 81901, 99990, 118079, 136168, 154257, 172346, 190435, 208524, 398959

Here are the Farey fraction numerators (permalink):

5, 8, 11, 19, 30, 49, 68, 87, 106, 193, 299, 492, 685, 878, 1071, 1264, 1457, 2721, 4178, 6899, 9620, 12341, 15062, 17783, 20504, 23225, 25946, 49171, 75117, 124288, 173459, 222630, 271801, 320972, 370143, 419314, 468485, 517656, 566827, 1084483

There are OEIS entries for the numerators and denominators of the Farey fraction approximations to most of the standard constants e.g. \( \pi \). Here are the Farey fractions together with their numerators and denominators for \( \pi \):

The progressive list of approximating Farey fractions is given by (permalink):

[7/2, 10/3, 13/4, 16/5, 19/6, 22/7, 25/8, 47/15, 69/22, 91/29, 113/36, 135/43, 157/50, 179/57, 201/64, 223/71, 245/78, 267/85, 289/92, 311/99, 333/106, 355/113, 688/219, 1043/332, 1398/445, 1753/558, 2108/671, 2463/784, 2818/897, 3173/1010, 3528/1123, 3883/1236, 4238/1349, 4593/1462, 4948/1575, 5303/1688, 5658/1801, 6013/1914, 6368/2027, 6723/2140, 7078/2253, 7433/2366, 7788/2479, 8143/2592, 8498/2705, 8853/2818, 9208/2931, 9563/3044, 9918/3157, 10273/3270, 10628/3383, 10983/3496, 11338/3609, 11693/3722, 12048/3835, 12403/3948, 12758/4061, 13113/4174, 13468/4287, 13823/4400, 14178/4513, 14533/4626, 14888/4739, 15243/4852, 15598/4965, 15953/5078, 16308/5191, 16663/5304, 17018/5417, 17373/5530, 17728/5643, 18083/5756, 18438/5869, 18793/5982, 19148/6095, 19503/6208, 19858/6321, 20213/6434, 20568/6547, 20923/6660, 21278/6773, 21633/6886, 21988/6999, 22343/7112, 22698/7225, 23053/7338, 23408/7451, 23763/7564, 24118/7677, 24473/7790, 24828/7903, 25183/8016, 25538/8129, 25893/8242, 26248/8355, 26603/8468, 26958/8581, 27313/8694, 27668/8807, 28023/8920, 28378/9033, 28733/9146, 29088/9259, 29443/9372, 29798/9485, 30153/9598, 30508/9711, 30863/9824, 31218/9937, 31573/10050, 31928/10163, 32283/10276, 32638/10389, 32993/10502, 33348/10615, 33703/10728, 34058/10841, 34413/10954, 34768/11067, 35123/11180, 35478/11293, 35833/11406, 36188/11519, 36543/11632, 36898/11745, 37253/11858, 37608/11971, 37963/12084, 38318/12197, 38673/12310, 39028/12423, 39383/12536, 39738/12649, 40093/12762, 40448/12875, 40803/12988, 41158/13101, 41513/13214, 41868/13327, 42223/13440, 42578/13553, 42933/13666, 43288/13779, 43643/13892, 43998/14005, 44353/14118, 44708/14231, 45063/14344, 45418/14457, 45773/14570, 46128/14683, 46483/14796, 46838/14909, 47193/15022, 47548/15135, 47903/15248, 48258/15361, 48613/15474, 48968/15587, 49323/15700, 49678/15813, 50033/15926, 50388/16039, 50743/16152, 51098/16265, 51453/16378, 51808/16491, 52163/16604, 52518/16717, 52873/16830, 53228/16943, 53583/17056, 53938/17169, 54293/17282, 54648/17395, 55003/17508, 55358/17621, 55713/17734, 56068/17847, 56423/17960, 56778/18073, 57133/18186, 57488/18299, 57843/18412, 58198/18525, 58553/18638, 58908/18751, 59263/18864, 59618/18977, 59973/19090, 60328/19203, 60683/19316, 61038/19429, 61393/19542, 61748/19655, 62103/19768, 62458/19881, 62813/19994, 63168/20107, 63523/20220, 63878/20333, 64233/20446, 64588/20559, 64943/20672, 65298/20785, 65653/20898, 66008/21011, 66363/21124, 66718/21237, 67073/21350, 67428/21463, 67783/21576, 68138/21689, 68493/21802, 68848/21915, 69203/22028, 69558/22141, 69913/22254, 70268/22367, 70623/22480, 70978/22593, 71333/22706, 71688/22819, 72043/22932, 72398/23045, 72753/23158, 73108/23271, 73463/23384, 73818/23497, 74173/23610, 74528/23723, 74883/23836, 75238/23949, 75593/24062, 75948/24175, 76303/24288, 76658/24401, 77013/24514, 77368/24627, 77723/24740, 78078/24853, 78433/24966, 78788/25079, 79143/25192, 79498/25305, 79853/25418, 80208/25531, 80563/25644, 80918/25757, 81273/25870, 81628/25983, 81983/26096, 82338/26209, 82693/26322, 83048/26435, 83403/26548, 83758/26661, 84113/26774, 84468/26887, 84823/27000, 85178/27113, 85533/27226, 85888/27339, 86243/27452, 86598/27565, 86953/27678, 87308/27791, 87663/27904, 88018/28017, 88373/28130, 88728/28243, 89083/28356, 89438/28469, 89793/28582, 90148/28695, 90503/28808, 90858/28921, 91213/29034, 91568/29147, 91923/29260, 92278/29373, 92633/29486, 92988/29599, 93343/29712, 93698/29825, 94053/29938, 94408/30051, 94763/30164, 95118/30277, 95473/30390, 95828/30503, 96183/30616, 96538/30729, 96893/30842, 97248/30955, 97603/31068, 97958/31181, 98313/31294, 98668/31407, 99023/31520, 99378/31633, 99733/31746, 100088/31859, 100443/31972, 100798/32085, 101153/32198, 101508/32311, 101863/32424, 102218/32537, 102573/32650, 102928/32763, 103283/32876, 103638/32989, 103993/33102, 104348/33215, 208341/66317, 312689/99532, 521030/165849, 833719/265381, 1146408/364913, 1980127/630294, 3126535/995207, 4272943/1360120]

Here are the Farey fraction numerators for \( \pi \) (permalink):

7, 10, 13, 16, 19, 22, 25, 47, 69, 91, 113, 135, 157, 179, 201, 223, 245, 267, 289, 311, 333, 355, 688, 1043, 1398, 1753, 2108, 2463, 2818, 3173, 3528, 3883, 4238, 4593, 4948, 5303, 5658, 6013, 6368, 6723, 7078, 7433, 7788, 8143, 8498, 8853, 9208, 9563, 9918, 10273, 10628, 10983, 11338, 11693, 12048, 12403, 12758, 13113, 13468, 13823, 14178, 14533, 14888, 15243, 15598, 15953, 16308, 16663, 17018, 17373, 17728, 18083, 18438, 18793, 19148, 19503, 19858, 20213, 20568, 20923, 21278, 21633, 21988, 22343, 22698, 23053, 23408, 23763, 24118, 24473, 24828, 25183, 25538, 25893, 26248, 26603, 26958, 27313, 27668, 28023, 28378, 28733, 29088, 29443, 29798, 30153, 30508, 30863, 31218, 31573, 31928, 32283, 32638, 32993, 33348, 33703, 34058, 34413, 34768, 35123, 35478, 35833, 36188, 36543, 36898, 37253, 37608, 37963, 38318, 38673, 39028, 39383, 39738, 40093, 40448, 40803, 41158, 41513, 41868, 42223, 42578, 42933, 43288, 43643, 43998, 44353, 44708, 45063, 45418, 45773, 46128, 46483, 46838, 47193, 47548, 47903, 48258, 48613, 48968, 49323, 49678, 50033, 50388, 50743, 51098, 51453, 51808, 52163, 52518, 52873, 53228, 53583, 53938, 54293, 54648, 55003, 55358, 55713, 56068, 56423, 56778, 57133, 57488, 57843, 58198, 58553, 58908, 59263, 59618, 59973, 60328, 60683, 61038, 61393, 61748, 62103, 62458, 62813, 63168, 63523, 63878, 64233, 64588, 64943, 65298, 65653, 66008, 66363, 66718, 67073, 67428, 67783, 68138, 68493, 68848, 69203, 69558, 69913, 70268, 70623, 70978, 71333, 71688, 72043, 72398, 72753, 73108, 73463, 73818, 74173, 74528, 74883, 75238, 75593, 75948, 76303, 76658, 77013, 77368, 77723, 78078, 78433, 78788, 79143, 79498, 79853, 80208, 80563, 80918, 81273, 81628, 81983, 82338, 82693, 83048, 83403, 83758, 84113, 84468, 84823, 85178, 85533, 85888, 86243, 86598, 86953, 87308, 87663, 88018, 88373, 88728, 89083, 89438, 89793, 90148, 90503, 90858, 91213, 91568, 91923, 92278, 92633, 92988, 93343, 93698, 94053, 94408, 94763, 95118, 95473, 95828, 96183, 96538, 96893, 97248, 97603, 97958, 98313, 98668, 99023, 99378, 99733, 100088, 100443, 100798, 101153, 101508, 101863, 102218, 102573, 102928, 103283, 103638, 103993, 104348, 208341, 312689, 521030, 833719, 1146408, 1980127, 3126535, 4272943 (OEIS A097545)

Here are the Farey fraction denominators for \( \pi \) (permalink):

2, 3, 4, 5, 6, 7, 8, 15, 22, 29, 36, 43, 50, 57, 64, 71, 78, 85, 92, 99, 106, 113, 219, 332, 445, 558, 671, 784, 897, 1010, 1123, 1236, 1349, 1462, 1575, 1688, 1801, 1914, 2027, 2140, 2253, 2366, 2479, 2592, 2705, 2818, 2931, 3044, 3157, 3270, 3383, 3496, 3609, 3722, 3835, 3948, 4061, 4174, 4287, 4400, 4513, 4626, 4739, 4852, 4965, 5078, 5191, 5304, 5417, 5530, 5643, 5756, 5869, 5982, 6095, 6208, 6321, 6434, 6547, 6660, 6773, 6886, 6999, 7112, 7225, 7338, 7451, 7564, 7677, 7790, 7903, 8016, 8129, 8242, 8355, 8468, 8581, 8694, 8807, 8920, 9033, 9146, 9259, 9372, 9485, 9598, 9711, 9824, 9937, 10050, 10163, 10276, 10389, 10502, 10615, 10728, 10841, 10954, 11067, 11180, 11293, 11406, 11519, 11632, 11745, 11858, 11971, 12084, 12197, 12310, 12423, 12536, 12649, 12762, 12875, 12988, 13101, 13214, 13327, 13440, 13553, 13666, 13779, 13892, 14005, 14118, 14231, 14344, 14457, 14570, 14683, 14796, 14909, 15022, 15135, 15248, 15361, 15474, 15587, 15700, 15813, 15926, 16039, 16152, 16265, 16378, 16491, 16604, 16717, 16830, 16943, 17056, 17169, 17282, 17395, 17508, 17621, 17734, 17847, 17960, 18073, 18186, 18299, 18412, 18525, 18638, 18751, 18864, 18977, 19090, 19203, 19316, 19429, 19542, 19655, 19768, 19881, 19994, 20107, 20220, 20333, 20446, 20559, 20672, 20785, 20898, 21011, 21124, 21237, 21350, 21463, 21576, 21689, 21802, 21915, 22028, 22141, 22254, 22367, 22480, 22593, 22706, 22819, 22932, 23045, 23158, 23271, 23384, 23497, 23610, 23723, 23836, 23949, 24062, 24175, 24288, 24401, 24514, 24627, 24740, 24853, 24966, 25079, 25192, 25305, 25418, 25531, 25644, 25757, 25870, 25983, 26096, 26209, 26322, 26435, 26548, 26661, 26774, 26887, 27000, 27113, 27226, 27339, 27452, 27565, 27678, 27791, 27904, 28017, 28130, 28243, 28356, 28469, 28582, 28695, 28808, 28921, 29034, 29147, 29260, 29373, 29486, 29599, 29712, 29825, 29938, 30051, 30164, 30277, 30390, 30503, 30616, 30729, 30842, 30955, 31068, 31181, 31294, 31407, 31520, 31633, 31746, 31859, 31972, 32085, 32198, 32311, 32424, 32537, 32650, 32763, 32876, 32989, 33102, 33215, 66317, 99532, 165849, 265381, 364913, 630294, 995207, 1360120 (OEIS A097546)

The progressive list of approximating Farey fractions for \( \sqrt{2} \) is given by (permalink):

3/2, 4/3, 7/5, 10/7, 17/12, 24/17, 41/29, 58/41, 99/70, 140/99, 239/169, 338/239, 577/408, 816/577, 1393/985, 1970/1393, 3363/2378, 4756/3363, 8119/5741, 11482/8119, 19601/13860, 27720/19601, 47321/33461, 66922/47321, 114243/80782, 161564/114243, 275807/195025, 390050/275807, 665857/470832, 941664/665857, 1607521/1136689

Here are the Farey fraction numerators for \( \sqrt{2} \) (permalink):

3, 4, 7, 10, 17, 24, 41, 58, 99, 140, 239, 338, 577, 816, 1393, 1970, 3363, 4756, 8119, 11482, 19601, 27720, 47321, 66922, 114243, 161564, 275807, 390050, 665857, 941664, 1607521 (OEIS A119016)

Here are Farey fraction denominators for \( \sqrt{2} \) (permalink):

2, 3, 5, 7, 12, 17, 29, 41, 70, 99, 169, 239, 408, 577, 985, 1393, 2378, 3363, 5741, 8119, 13860, 19601, 33461, 47321, 80782, 114243, 195025, 275807, 470832, 665857, 1136689 (OEIS A002965)

Other terms that are used in this context are "interleave denominators" and "interleave numerators". The Farey fractions for the golden ratio are the successive ratios of Fibonacci numbers (higher term as numerator and lower term as denominator). Permalink.

Now what about the mathematician to whom these kinds of fractions owe their name. Well, he wasn't really a mathematician but rather a geologist, although he does have an entry in MacTutor biographies of mathematicians. Here is a link. Some details follow:

Born on the 24th of September 1766 in Woburn, Bedfordshire, England

Died on the 6th January 1826 in London, England

Summary: John Farey was an Engish geologist, noted as a mathematician for the Farey sequence which is a listing of the rationals.

Wednesday, 26 June 2024

Unity as a Sum of Egyptian Fractions

Continuing with Achmad Damar's "104 Number Theory", I found this little problem interesting. The author asks: let \(k\) be an even number. Is it possible to write 1 as the sum of the reciprocals of \(k\) odd integers? He approaches the problem by assuming that:$$ 1=\frac{1}{n_1}+ \cdots + \frac{1}{n_k}$$for odd integers \(n_1, \dots, n_k \). Removing denominators produces:$$n_1 \cdots n_k=s_1+ \cdots + s_k $$where all \(s_i\) are odd because numbers that are the products of odd numbers are themselves odd. This is impossible because the LHS is odd and the RHS is even because there are an even number (\(k\)) of integers and the sum of each pair of odd  integers is even. Thus it is not possible to represent 1 as the sum of the reciprocals of an even number of odd integers. However, if \(k\) is odd, then it is possible. The example is given of unity expressed as the sums of reciprocals of nine odd integers. See Figure 1.


Figure 1

This got me thinking about how this result was obtained. There are 114 odd integers between 3 and 231 inclusive and 7,032,112,662,630 ways to sample 9 reciprocals at a time (that's over seven trillion ways). Nonetheless, when running this program in SageMathCell, the above combination of fractions was quickly spat out and after that the program timed out. Running the same program in my jupyter notebook (to avert the program timing out), no further combinations were generated. Is this combination of reciprocals unique? I'm not sure.

Certainly we can state that there are infinitely many disjoint sets of positive integers in which the sum of those reciprocals is equal to unity (source). I have a program that generates Egyptian fractions for rational numbers \(p/q\) where \(p<q\). Using this program, I can determine that: $$ \begin{align} \frac{5}{7} &= \frac{1}{2}+\frac{1}{5}+\frac{1}{70}\\ \frac{2}{7} &= \frac{1}{4}+\frac{1}{48}\\1 &= \frac{1}{2}+\frac{1}{4}+\frac{1}{5}+\frac{1}{48}+\frac{1}{70} \end{align}$$Alternatively, I could take another pair of fractions that add to 1 such as 7/11 and 4/11. This gives:$$ \begin{align} \frac{7}{11} &= \frac{1}{2} + \frac{1}{8} + \frac{1}{88} \\ \frac{4}{11} &= \frac{1}{3} + \frac{1}{33} \\ 1 &= \frac{1}{2}+ \frac{1}{3}+ \frac{1}{8} + \frac{1}{33} + \frac{1}{88} \end{align} $$Obviously we could continue this process indefinitely. This Mathematics Stack Exchange source states that:

R. L. Graham showed that \( a(n)>0 \) for \( n>77 \), where \( a(n) \) is the number of ways to express 1 as the sum of distinct unit fractions such that the sum of the denominators is \( n \). This implies that for values of \( n \leq 77 \) such representations may not be possible. In the two examples shown earlier the sum of denominators is greater than 77. However, representations where \(n \leq 77 \) are certainly possible. For example from the same Stack Exchange source we see that:$$ \begin{align} 2+3+11+22+33 &= 2+5+8+12+20+24 \text{ and both total }71\\2+4+9+12+18 &= 2+5+6+12+20 \text{ and both total }45 \end{align} $$and the sum of reciprocals of LHS's and RHS's all total 1.

The simplest representation of 1 using Egyptian fractions is:$$1=\frac{1}{2}+\frac{1}{3}+\frac{1}{6}$$but once we impose special conditions such as all denominators must be odd or prime or whatever, then things get more complicated. This site offers some useful insights into a problem that can well be explored in far more depth than I've attempted here.

Friday, 28 April 2023

Rational Solutions to a^a = b^b

Here's a problem that I encountered on this site:

Find all pairs of rational numbers \((a,b)\) such that \(a^a=b^b\) for \(0 < a < b\).

One solution that was proposed runs as follows:

Write \(b=ax\) for some \(x>1\). Then \(x=b/a\) so \(x\) is rational.

Then taking logs, we get $$ \begin{align} a\log a&=b\log b\\&=ax\log(ax) \\ \log a&= x \log(ax) \\&=x \log(x)+x \log(a)      \\&=\frac{x\log x}{1-x} \\  a&=x^{\frac{x}{1-x}}\\b&=x^{\frac{1}{1-x}} \end{align} \\ \text{since } x\neq1 \text{ and } a\neq0$$Since \(x\) is rational, it suffices to find the values of \(x>1\) for which \(x^{\frac{1}{1-x}}\) is rational.

We claim that the only such values of \(x\) are \(x=\dfrac{n+1}{n}\) where \(n\) is an integer.

We may write \(x=1+\dfrac1n\) where \(n\in\mathbb{Q}\), \(n>0\).

It is easy to see if \(n\) is a positive integer that \(x^{\frac{1}{1-x}}\) is rational.

If \(n\) is not an integer, write \(n=p/q\) where \(p,q\in\mathbb{Z}^+\) are coprime with \(q>1\).

We have \(x^{\frac{1}{1-x}}=\left(\dfrac{n}{n+1}\right)^n=\left(\dfrac{p}{p+q}\right)^{p/q}\).

Hence \(p\) and \(p+q\) must be \(q \,\)th powers.

No two \(q \,\)th powers can differ by \(q\) since for positive integers \(u,v,q\), we have by the Binomial Theorem, $$(u+v)^q-u^q=qu^{q-1}v+\ldots+v^q>q\,.$$Therefore, if \(n\) is not an integer, \(x^{\frac{1}{1-x}}\) is not rational, so the only rational solutions are given by $$a=\left(\dfrac{n}{n+1}\right)^{n+1} \text{ and } \, b=\left(\dfrac{n}{n+1}\right)^n \text{ with } n\in\mathbb{Z}^+$$The initial values of \(a\) and \(b\) are shown in Figure 1.


Figure 1: permalink

Thursday, 1 December 2022

Numbers as Sums of Two Rational Cubes

... one of the oldest questions in number theory: How many integers can be written as the sum of two cubed fractions, or, as mathematicians call them, rational numbers? The numbers 6 and 13, for example, can be written as: $$ \begin{align} 6&= \left ( \dfrac{17}{21} \right ) ^3 +  \left ( \dfrac{37}{21} \right  ) ^3\\ 13 &=  \left ( \dfrac{7}{3} \right ) ^3+ \left ( \dfrac{2}{3} \right )^3 \end{align}$$Mathematicians have suspected for decades that half of all integers can be written this way. Just as with odd and even numbers, this property appears to divide whole numbers into two equal camps: those that are the sum of two cubes, and those that aren’t.

I came across this statement in a Quanta article and it came as news to me that it was "one of the oldest questions in number theory". Well, at least now I know. My immediate thought was how to translate this problem into one involving just integers rather than fractions. It's not difficult. For an integer \(n\):$$ \begin{align} \text{if }  \left ( \frac{a}{c} \right ) ^3 + \left ( \frac{b}{c} \right  ) ^3&=n\\ \text{then }a^3+b^3&=c^3 \times n \end{align}$$Using this approach, it's easy enough to use SageMathCell to generate the result for say 13 (shown earlier). Here is the permalink. Figure 1 shows the numbers from 1 to 100 that can be written as a sum of two cubed fractions:


Figure 1: numbers in blue can be written as the sum of
two cubed rational numbers; the others cannot. 

Some of these numbers can be written as the sum of two integers cubed e.g. \(9=1^3+2^3\) or \(35=2^3+3^3\) but are of course equivalent to fractions when written as:$$ \begin{align} 9&= \left ( \dfrac{1}{1} \right ) ^3 +  \left ( \dfrac{2}{1} \right  ) ^3\\ 35 &=  \left ( \dfrac{2}{1} \right ) ^3+ \left ( \dfrac{3}{1} \right )^3 \end{align}$$The need for this clarification arises from the use of the imprecise term "fraction" whereas the term "rational number" should be used instead. Some of the pairs of rational numbers, whose cubes add to the blue numbers shown in Figure 1, are not easy to calculate. Take for instance:$$x^3+y^3=97$$The graph of this function is shown in Figure 2.


Figure 2: Geogebra

The values of \(x\) and \(y\) must be positive and lie between \(0\) and \(97^{1/3} \approx 4.5947\). Using SageMathCell, the calculation quickly times out and using my Jupyter notebook the calculation is still chugging away. It remains to be seen whether my algorithm will eventually display a solution. As the article says:

In the sum-of-two-cubes problem, the fractions involved can be enormous: The number 2,803, for example, is the sum of two cubed fractions whose denominators each have 40 digits.
The article goes on to say that:

Mathematicians have suspected for decades that half of all integers can be written this way (as a sum of the cubes of two rational numbers). Just as with odd and even numbers, this property appears to divide whole numbers into two equal camps: those that are the sum of two cubes, and those that aren’t. But nobody was able to prove this, or even give any bound on the proportion of whole numbers that fall into each camp. As far as mathematicians knew, the camp consisting of sums of rational cubes might be vanishingly small — or it might contain nearly every whole number. Mathematicians have calculated that, if something called the Birch and Swinnerton-Dyer conjecture is true (as is widely believed), about 59% of numbers up to 10 million are the sum of two rational cubes. But such data can, at best, offer hints about how the rest of the number line might behave.

What the paper discussed in this article found was that at least 2/21 (about 9.5%) and at most 5/6 (about 83%) of whole numbers can be written as the sum of two cubed fractions.

Getting back to these fractions, I discovered helpful resources at this site which assisted me in completing the following information about the sums of cubes up to 100. The list is still incomplete and I'll endeavour to complete it as time goes by. It's interesting that three different sums are given on the site for 19 and I'm wondering if the other numbers whose sums have been completed can also be represented in alternative ways.

\(1\)     pending
\(2\)     pending
\(6 = \left ( \dfrac{17}{21} \right )^3 + \left( \dfrac{37}{21} \right )^3 \) 
\(7 = \left ( \dfrac{5}{3} \right )^3 + \left( \dfrac{4}{3} \right )^3 \)
\(8\)    pending
\(9 = \left ( \dfrac{1}{1} \right )^3 + \left( \dfrac{2}{1} \right )^3 \)
\(12 = \left ( \dfrac{19}{39} \right )^3 + \left( \dfrac{89}{39} \right )^3 \)
\(13 = \left ( \dfrac{2}{3} \right )^3 + \left( \dfrac{7}{3} \right )^3 \)
\(15 = \left ( \dfrac{397}{294} \right )^3 + \left( \dfrac{683}{294} \right )^3 \)
\(16\)    pending
\(17\)    pending
\(19 = \left (\dfrac{1}{3} \right )^3 + \left (\dfrac{8}{3} \right )^3 = \left (\dfrac{5}{2} \right) ^3 + \left (\dfrac{3}{2} \right )^3 =\left ( \dfrac{92}{35} \right )^3 + \left (\dfrac{33}{35} \right )^3 \)
\(20 = \left ( \dfrac{1}{7} \right )^3 + \left( \dfrac{19}{7} \right )^3 \)
\(22\)    pending
\(26\)    pending
\(27\)    pending
\(28 = \left ( \dfrac{1}{1} \right )^3 + \left( \dfrac{3}{1} \right )^3 \)
\(30\)    pending
\(31\)    pending
\(33\)    pending
\(34\)    pending
\(35 = \left ( \dfrac{2}{1} \right )^3 + \left( \dfrac{3}{1} \right )^3 \)
\(37 = \left ( \dfrac{18}{7} \right )^3 + \left( \dfrac{19}{7} \right )^3 \)
\(42\)    pending
\(43 = \left ( \dfrac{1}{2} \right )^3 + \left( \dfrac{7}{2} \right )^3 \)
\(48 = \left ( \dfrac{34}{21} \right )^3 + \left( \dfrac{74}{21} \right )^3 \)
\(49\)    pending
\(50\)    pending
\(51\)    pending
\(53\)    pending
\(54\)    pending
\(56 = \left ( \dfrac{8}{3} \right )^3 + \left( \dfrac{10}{3} \right )^3 \)
\(58\)    pending
\(61\)    pending
\(62 = \left ( \dfrac{7}{3} \right )^3 + \left( \dfrac{11}{3} \right )^3 \)
\(63\)    pending
\(64\)    pending
\(65 = \left ( \dfrac{1}{1} \right )^3 + \left( \dfrac{4}{1} \right )^3 \)
\(67\)    pending
\(68\)    pending
\(69\)    pending
\(70 = \left ( \dfrac{17}{13} \right )^3 + \left( \dfrac{53}{13} \right )^3 \)
\(71\)    pending
\(72 = \left ( \dfrac{2}{1} \right )^3 + \left( \dfrac{4}{1} \right )^3 \)
\(75\)    pending
\(78\)    pending
\(79\)    pending
\(84\)    pending
\(85\)   pending
\(86 = \left ( \dfrac{5}{3} \right )^3 + \left( \dfrac{13}{3} \right )^3 \)
\(87\)    pending
\(89 = \left ( \dfrac{36}{13} \right )^3 + \left( \dfrac{53}{13} \right )^3 \)
\(90\)    pending
\(91 = \left ( \dfrac{3}{1} \right )^3 + \left( \dfrac{4}{1} \right )^3 \)
\(92\)    pending
\(94\)    pending
\(96 = \left ( \dfrac{38}{39} \right )^3 + \left( \dfrac{178}{39} \right )^3 \)
\(97\)    pending
\(98 = \left ( \dfrac{355}{152} \right )^3 + \left( \dfrac{669}{152} \right )^3 \)

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.

In the case of \(e\) the following fractions are generated once the integer part has been added back in (so our initial 1/2 becomes 2+1/2 = 5/2 etc):

5/2, 8/3, 11/4, 19/7, 30/11, 49/18, 68/25, 87/32, 106/39, 193/71, 299/110, 492/181, 685/252, 878/323, 1071/394, 1264/465, 1457/536, 2721/1001, 4178/1537, 6899/2538, 9620/3539, 12341/4540, 15062/5541, 17783/6542, 20504/7543, 23225/8544, 25946/9545, 49171/18089, 75117/27634, 124288/45723, 173459/63812, 222630/81901, 271801/99990, 320972/118079, 370143/136168, 419314/154257, 468485/172346, 517656/190435, 566827/208524, 1084483/398959

I set the acceptable error to 0.000000000001 and once the fraction was below this the program stopped. The output that should be displayed above is:

Final approximating fraction for e is 1084483/398959
Decimal approximation is for e is 2.71828182845856
Actual decimal approximation for e is 2.71828182845905