Showing posts with label approximations. Show all posts
Showing posts with label approximations. 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, 27 April 2022

POBA: Primes Only Best Approximate

It takes a little getting used to the concept of what a POBA or Primes Only Best Approximate is. One definition runs:

"Suppose that \( x > 0 \). A fraction \( p/q \) of primes is a primes-only best approximate (POBA), and we write "\( p/q \) in B( \( x \) )", if \(0 < |x - p/q| < |x - u/v| \) for all primes \(u\) and \(v\) such that \(v < q\), and also, \( |x - p/q| < |x - p'/q|  \) for every prime \(p'\) except \(p\). Note that for some choices of \(x\), there are values of \(q\) for which there are two POBAs. In these cases, the greater is placed first; e.g., B(3) = (7/2, 5/2, 17/5, 13/5, 23/7, 19/7, ...)." 

Things become clearer if we look at a specific example. On April 23rd 2022, I turned 26683 days old and one of the properties of this number is that it's a member of OEIS A265788:


 A265788

Numerators of primes-only best approximates (POBAs) to \( \sqrt{5} \).          


The POBAs to start with are 3/2, 5/2, 7/3, 11/5, 29/13, 163/73, 199/89, 521/233. The initial members of the sequence are thus 3, 5, 7, 11, 29, 163, 199, 521 (with the continuation being 3571, 26683, 111667, 150427, 154841 etc.). Table 1 shows the initial approximations:


Table 1: permalink POBAs for \( \sqrt{5}\)

The convergence is far slower than with the continued fraction  where the numerator and denominator of each fraction are coprime. See Table 2 and note that scientific notation is used once the difference becomes very small.


Table 2: permalink continued fraction approximations for \( \sqrt{5} \)

The SageMath algorithm I developed is rather sluggish but it can be easily modified to accommodate other irrational or transcendental numbers such as \( \pi \). See Table 3 for the POBAs for \( \pi \).


Table 3: permalink POBAs for \( \pi \)

Once again, the continued fractions are far more efficient and the display quickly changes to scientific notation because of the small differences. See Table 4 for the continued fraction approximations of \( \pi \).


Table 4: permalink continued fraction approximations for \( \pi \)

Let's not forget that the continued fractions for irrational and transcendental numbers offer the best approximations. While the POBAs are clearly less efficient, they are nonetheless interesting in their own right. Further variations can be envisaged such as fractions whose numerators and denominators consist of only Fibonacci numbers rather than primes.

Friday, 11 February 2022

Twin Prime Constant

The following standard mathematical constants are defined in SageMath (link):

  • 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. In this post, I'll be examining the former but first let's use SageMathCell to approximate the constants in the above list. See Figure 1.


Figure 1: permalink

Figure 2 zooms in a little closer on the output from Figure 1:


Figure 2

So what is the twin prime constant? Well, according to this source, the famous mathematical pair of Hardy and Littlewood conjectured that there are about:$$2  \prod_{p \geq 3} \frac{p(p-2)}{(p-1)^2} \int_2 ^x \frac{ \text{d}x}{(\log{x})^2}  \approx 1.320323632 \int_2 ^x \frac{ \text{d}x}{(\log{x})^2}$$twin primes less than or equal to \(x\) where the infinite product is the twin prime constant. In other words, the twin prime constant is given by$$\prod_{p \geq 3} \frac{p(p-2)}{(p-1)^2} \approx 0.66016181584686957393$$The  agreement between the calculated number of twin primes and the actual number gets better and better as \(x\) gets larger. Figure 3 shows the progression:


Figure 3

This is a complex topic and I won't go any deeper into here, as my intention was simply to explain what the constant represents and how it arises.

Saturday, 23 October 2021

Counting People with Mid-Millennium Numbers

Yesterday marked a milestone of sorts. I reached a diurnal age of 26500, a somewhat unremarkable number commemorated with the tweet shown in Figure 1.


Figure 1

I appended two screenshots to the tweet, one from the OEIS (Figure 2) and the other from Numbers Aplenty (Figure 3):


Figure 2


Figure 3

For some reason, I was prompted to think about what the representation of 26500 might be in Roman numerals. It turns out to be as shown in Figure 4.


Figure 4

So what has any of this to do with counting people? Well, nothing really but as I was investigating the number's properties, it occurred to me that this would be a popular rounding number for populations of towns and islands or communities with common interests or characteristics. This can be confirmed from the following data:
  • Tick-borne encephalitis, TBE, has been observed in Aland Islands (population 26,500) for more than 60 years (source). Interestingly:
The self-governing province of the Ã…land Islands lies off the southwest coast of Finland. Ã…land is an autonomous, demilitarised, Swedish-speaking region of Finland. Ã…land consists of more than 6,700 islands, but the current population of over 30,000 live on only 60 islands. Source.

  • The most recent mid-year population estimates (2020) for the Outer Hebrides gives a population of 26,500. This shows a decrease of 0.8% (220 persons) from mid 2019 to mid 2020. Source

  • Unemployment in the first quarter of 2020: Further rise in Gaza’s unemployment rate; 26,500 people lost their jobs even before the pandemic. Source.

  • CDC estimates Salmonella bacteria cause about 1.35 million infections, 26,500 hospitalisations, and 420 deaths in the United States every year. Food is the source for most of these illnesses. Source.

  • On 30 June 2020, the population of Na h-Eileanan Siar was 26,500. This is a decrease of 0.8% from 26,720 in 2019. Over the same period, the population of Scotland increased by 0.0%. Source.
  • The Aromanians in Romania are a non-recognised ethnic minority in Romania that numbered around 26,500 people in 2006. Source.

  • At June 2011, there were 1.01 million children under 15 years of age in Victoria, with boys outnumbering girls by 26,500. This age group comprised 18% of the total Victorian population, down from 20% in June 2001. Source.

  • Published estimates of the risk of vaccine-induced thrombotic thrombocytopenia (VITT) from countries with moderate to high data quality range from 1 case per 26,500 to 1 case per 127,300 first doses of AstraZeneca/COVISHIELD administered. Source.

  • The number of dwellings in Camden Council is forecast to grow from 26,500 in 2016 to 79,631 in 2036, with the average household size falling from 3.08 to 3.01 by 2036. Source.

  • Welcome to the official website of Nicholas County -  a safe, rural community located in the heart of central WV.  County Seat - Summersville; Population: 26,500; Home of WV's largest lake  in the county. Source.

  • February 11, 2021 — The number of vaccine doses available for New York City each week received a 26,500-dose boost through a federal program that provides retail pharmacies with the COVID-19 vaccine. Source.

The list goes on indefinitely. Of course, the same would hold true of other mid-millennium numbers like 25500 and 27500. For example:
The increase in the number of students inside Midland ISD compared to the start of the previous school year will top 1,000. Superintendent Orlando Riddick said Tuesday the district’s student population appears to not only have eclipsed 25,000 but will end up closer to 25,500. September 2017. Source.
So I've coined this special term, mid-millennium numbers, to describe a class of numbers that are commonly used when quantifying data that cannot be precisely determined. These are to be preferred to millennium numbers such as 26,000 which appear a little too "approximate" (having only two significant figures as opposed to the three of 26,500).

For the next mid-millennium number (27500) see Another Mid-Millennium Number.

Thursday, 26 April 2018

Taylor Series

For a really superb video explaining how Taylor Polynomials and Taylor Series are created, you need go no further than this video by 3Blue1Brown.


$$ \sum_{n=0} ^ {\infty} \frac {f^{(n)}(a)}{n!} \, (x-a)^{n} =f(a)+\frac {f'(a)}{1!} (x-a)+ \frac{f''(a)}{2!} (x-a)^2+\frac{f'''(a)}{3!}(x-a)^3+ \cdots $$The formula above was copied from Wikipedia where all mathematical expressions are in LaTeX but enclosed within <math> ... </math> tags. While it's always good practice to create the LaTeX from scratch, it's still useful to remember that any mathematical expressions found in Wikipedia can be copied directly into Blogger.

Anyway, the main point of this post is to remind myself to watch more of 3Blue1Brown's videos. The Taylor Series video was created in May of 2017 and since then twenty more have been added. Altogether he has almost seventy videos of which I've watched sixteen. The description of the channel states that:
3Blue1Brown, by Grant Sanderson, is some combination of math and entertainment, depending on your disposition. The goal is for explanations to be driven by animations and for difficult problems to be made simple with changes in perspective. 
He can be followed on Twitter at https://twitter.com/3blue1brown and a website at http://www.3blue1brown.com.