Wednesday, 31 July 2024

Counting the Days

On this final day of July 2024, it seems appropriate to say something about the date which can be written in YYYYMMDD format as 20240731. In a post from the 26th of January 2023 titled Turning Dates into Numbers, I looked at 2023 in the light of this number format and so I should do the same for 2024 now that we are more than halfway through it. I have an algorithm that I created for generating the list of days in 2024 which, being a leap year, will contain 366 entries. Here is the list:

20240101, 20240102, 20240103, 20240104, 20240105, 20240106, 20240107, 20240108, 20240109, 20240110, 20240111, 20240112, 20240113, 20240114, 20240115, 20240116, 20240117, 20240118, 20240119, 20240120, 20240121, 20240122, 20240123, 20240124, 20240125, 20240126, 20240127, 20240128, 20240129, 20240130, 20240131, 20240201, 20240202, 20240203, 20240204, 20240205, 20240206, 20240207, 20240208, 20240209, 20240210, 20240211, 20240212, 20240213, 20240214, 20240215, 20240216, 20240217, 20240218, 20240219, 20240220, 20240221, 20240222, 20240223, 20240224, 20240225, 20240226, 20240227, 20240228, 20240229, 20240301, 20240302, 20240303, 20240304, 20240305, 20240306, 20240307, 20240308, 20240309, 20240310, 20240311, 20240312, 20240313, 20240314, 20240315, 20240316, 20240317, 20240318, 20240319, 20240320, 20240321, 20240322, 20240323, 20240324, 20240325, 20240326, 20240327, 20240328, 20240329, 20240330, 20240331, 20240401, 20240402, 20240403, 20240404, 20240405, 20240406, 20240407, 20240408, 20240409, 20240410, 20240411, 20240412, 20240413, 20240414, 20240415, 20240416, 20240417, 20240418, 20240419, 20240420, 20240421, 20240422, 20240423, 20240424, 20240425, 20240426, 20240427, 20240428, 20240429, 20240430, 20240501, 20240502, 20240503, 20240504, 20240505, 20240506, 20240507, 20240508, 20240509, 20240510, 20240511, 20240512, 20240513, 20240514, 20240515, 20240516, 20240517, 20240518, 20240519, 20240520, 20240521, 20240522, 20240523, 20240524, 20240525, 20240526, 20240527, 20240528, 20240529, 20240530, 20240531, 20240601, 20240602, 20240603, 20240604, 20240605, 20240606, 20240607, 20240608, 20240609, 20240610, 20240611, 20240612, 20240613, 20240614, 20240615, 20240616, 20240617, 20240618, 20240619, 20240620, 20240621, 20240622, 20240623, 20240624, 20240625, 20240626, 20240627, 20240628, 20240629, 20240630, 20240701, 20240702, 20240703, 20240704, 20240705, 20240706, 20240707, 20240708, 20240709, 20240710, 20240711, 20240712, 20240713, 20240714, 20240715, 20240716, 20240717, 20240718, 20240719, 20240720, 20240721, 20240722, 20240723, 20240724, 20240725, 20240726, 20240727, 20240728, 20240729, 20240730, 20240731, 20240801, 20240802, 20240803, 20240804, 20240805, 20240806, 20240807, 20240808, 20240809, 20240810, 20240811, 20240812, 20240813, 20240814, 20240815, 20240816, 20240817, 20240818, 20240819, 20240820, 20240821, 20240822, 20240823, 20240824, 20240825, 20240826, 20240827, 20240828, 20240829, 20240830, 20240831, 20240901, 20240902, 20240903, 20240904, 20240905, 20240906, 20240907, 20240908, 20240909, 20240910, 20240911, 20240912, 20240913, 20240914, 20240915, 20240916, 20240917, 20240918, 20240919, 20240920, 20240921, 20240922, 20240923, 20240924, 20240925, 20240926, 20240927, 20240928, 20240929, 20240930, 20241001, 20241002, 20241003, 20241004, 20241005, 20241006, 20241007, 20241008, 20241009, 20241010, 20241011, 20241012, 20241013, 20241014, 20241015, 20241016, 20241017, 20241018, 20241019, 20241020, 20241021, 20241022, 20241023, 20241024, 20241025, 20241026, 20241027, 20241028, 20241029, 20241030, 20241031, 20241101, 20241102, 20241103, 20241104, 20241105, 20241106, 20241107, 20241108, 20241109, 20241110, 20241111, 20241112, 20241113, 20241114, 20241115, 20241116, 20241117, 20241118, 20241119, 20241120, 20241121, 20241122, 20241123, 20241124, 20241125, 20241126, 20241127, 20241128, 20241129, 20241130, 20241201, 20241202, 20241203, 20241204, 20241205, 20241206, 20241207, 20241208, 20241209, 20241210, 20241211, 20241212, 20241213, 20241214, 20241215, 20241216, 20241217, 20241218, 20241219, 20241220, 20241221, 20241222, 20241223, 20241224, 20241225, 20241226, 20241227, 20241228, 20241229, 20241230, 20241231

How many of these dates are prime? 21 in fact as opposed to last year's 18. Here are the primes:

20240107, 20240219, 20240323, 20240327, 20240411, 20240419, 20240531, 20240603, 20240611, 20240723, 20240729, 20240807, 20240819, 20240821, 20240903, 20241017, 20241029, 20241119, 20241121, 20241211, 20241229

With the above list of 2024's 366 days we can investigate primeness and many other number properties. As with 2023 however, there can be no palindromes. This will be the case until 2030 when 20300302 or 2nd March 2030 will break the drought. As for today's number, there is no listing for it in the OEIS but Numbers Aplenty provides some information. It has the following factorisation:$$20240731=7 \times 1327 \times 2179$$Additionally it is a:

  • sphenic number since it has three distinct prime factors
  • cyclic number since it has no factors in common with its totient (17328168.)
  • Duffinian number since it has no factors in common with its sum of divisors (23160320)
  • junction number because it is equal to n + sod(n) for n = 20240699 and 20240708.

Using my multipurpose algorithm, running a Jupyter notebook on my laptop (it times out on SageMathCell), I found the following information.

The Collatz Trajectory for 20240731 is:

[20240731, 60722194, 30361097, 91083292, 45541646, 22770823, 68312470, 34156235, 102468706, 51234353, 153703060, 76851530, 38425765, 115277296, 57638648, 28819324, 14409662, 7204831, 21614494, 10807247, 32421742, 16210871, 48632614, 24316307, 72948922, 36474461, 109423384, 54711692, 27355846, 13677923, 41033770, 20516885, 61550656, 30775328, 15387664, 7693832, 3846916, 1923458, 961729, 2885188, 1442594, 721297, 2163892, 1081946, 540973, 1622920, 811460, 405730, 202865, 608596, 304298, 152149, 456448, 228224, 114112, 57056, 28528, 14264, 7132, 3566, 1783, 5350, 2675, 8026, 4013, 12040, 6020, 3010, 1505, 4516, 2258, 1129, 3388, 1694, 847, 2542, 1271, 3814, 1907, 5722, 2861, 8584, 4292, 2146, 1073, 3220, 1610, 805, 2416, 1208, 604, 302, 151, 454, 227, 682, 341, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]

There are 107 steps required to reach 1 (see Figure 1).

Figure 1: a logarithmic scale has been used for the vertical axis

The Aliquot Sequence for 20240731 is:
[20240731, 2919589, 1, 0]

The Anti-Divisors of 20240731 are:
[2, 3, 11, 14, 33, 1613, 2654, 4358, 18578, 25097, 30506, 1226711, 3680133, 5783066, 13493821]

The Arithmetic Derivative of 20240731 is 2916075

The Maximum - Minimum Recursive Algorithm for 20240731 produces:
[20240731, 74199753, 86317632, 75326643, 53308665, 83299662, 77499423, 76326633, 53326665, 43299666, 76199733, 86408532, 86308632, 86326632, 64326654, 43208766, 85317642, 75308643, 84308652, 86308632]

The number of steps required is to reach home prime is 6 :
[20240731, 713272179, 31719736091, 180117612291, 3187931952743, 31310185086111, 349092126039593]

The multiplicative persistence of 20240731 is as follows:
[20240731, 0]

20240731 has Odds and Evens Trajectory of length 2 and is:
[20240731, 20240734, 20240732, 20240732]

The multipurpose algorithm that I developed has thus proven very useful for large numbers like 20240731 where the OEIS often provides no information. I should develop it further and set it up permanently on my laptop. I'd like to add results of adding and subtracting sums of digits and products of digits for starters but I need to systematically go through my SageMath notebook and include whatever I think might be interesting. For example, the determinant of the circulant matrix of a number comes to mind. This is an enterprise that I should seriously set about undertaking. It will refamiliarise me with many topics that I haven't had contact with for a while.

Tuesday, 30 July 2024

Hidden Palindromes

One of the properties of the number associated with my diurnal age today (27512) has an interesting property that is listed in its Numbers Aplenty entry. 

27512 is a number such that
27512 - product of digits (140) = 27372
a palindromic number

This is by means obvious at first glance and I wondered how many other numbers in the range up to 40,000 have this property that might formally be stated as follows:

\(n\) is a number such that
\(n\) - product of digits of \(n\) = a palindromic number

It didn't long to discover that there are 320 such numbers in the range up to 40,000. We must remember to exclude numbers containing the digit 0 because in that case the product of the digits will be zero. I'll only list the numbers here between 27512 and 40000 (permalink):

27512, 27582, 27666, 28128, 28184, 28336, 28352, 28398, 28466, 28852, 28924, 28974, 29246, 29562, 29592, 29664, 29778, 29784, 29997, 31231, 31429, 31781, 32199, 32513, 32563, 32627, 32631, 32717, 32753, 33341, 33427, 33477, 33619, 33981, 34237, 34453, 34629, 34691, 34831, 34939, 34953, 35273, 35323, 35483, 35543, 35663, 35813, 35963, 36139, 36563, 36777, 36796, 36888, 36968, 37241, 37419, 38261, 38353, 38593, 38747, 38817, 38867, 38931, 39287, 39489, 39617, 39779

Having subtraced the product of a number's digits, it's natural to consider adding this same product instead of subtracting it. Thus we are searching now for numbers with the property that:

\(n\) is a number such that
\(n\) + product of digits of \(n\) = a palindromic number

There are 305 such numbers in the range up to 40000 with this property and again I've only listed the numbers in a selected range, here between 27889 and 40000 (permalink)

27889, 28452, 28477, 28563, 28572, 28583, 28616, 28624, 28797, 28867, 28953, 29269, 29352, 29377, 29512, 29553, 29593, 31271, 31523, 31641, 31667, 31961, 31989, 32187, 32211, 32353, 32499, 32671, 32841, 32999, 34189, 34277, 34319, 34553, 34647, 34749, 34781, 35383, 35443, 35579, 35623, 35984, 36439, 36563, 36617, 36641, 36648, 36778, 36876, 36911, 36968, 37621, 37686, 37854, 37898, 37959, 37981, 38229, 38311, 38453, 38584, 38717, 38868, 38936, 39231, 39454, 39498, 39524, 39579, 39632, 39646, 39754

Let's take the first number in the previous list, 27889, we see that:

27889 is a number such that
27889 + product of digits (8064) = 35953
a palindromic number

What about numbers that become palindromic when the product of digits is both subtracted and added? We are looking for numbers with these criteria:

\(n\) is a number such that
\(n\) - product of digits of \(n\) = a palindromic number
\(n\) + product of digits of \(n\) = a palindromic number

It turns out that there are 15 of these in the range up 40000, most but not all being palindromic themselves. They are:

1, 2, 3, 4, 247, 252, 348, 843, 15451, 25152, 25252, 25352, 25452, 36563, 36968

Let's take 25452, palindromic itself, as an example:

25452 is a number such that
25452 - product of digits (400) = 25052
25452 + product of digits (400) = 25852
both are palindromic numbers

We can do the same thing with the sum of the digits of a number by subtracting or adding the sum to the number itself. There are 499 and 507 palindromes respectively that result from these two processes. The earlier algorithm is easily modified to generate a list of these numbers. Thus we can search for:

\(n\) is a number such that
\(n\) - sum of digits of \(n\) = a palindromic number

Here is a list of numbers satisfying this criterion from 28800 to 40000 (permalink):

28800, 28801, 28802, 28803, 28804, 28805, 28806, 28807, 28808, 28809, 29610, 29611, 29612, 29613, 29614, 29615, 29616, 29617, 29618, 29619, 30310, 30311, 30312, 30313, 30314, 30315, 30316, 30317, 30318, 30319, 31120, 31121, 31122, 31123, 31124, 31125, 31126, 31127, 31128, 31129, 32840, 32841, 32842, 32843, 32844, 32845, 32846, 32847, 32848, 32849, 33650, 33651, 33652, 33653, 33654, 33655, 33656, 33657, 33658, 33659, 34460, 34461, 34462, 34463, 34464, 34465, 34466, 34467, 34468, 34469, 35270, 35271, 35272, 35273, 35274, 35275, 35276, 35277, 35278, 35279, 36080, 36081, 36082, 36083, 36084, 36085, 36086, 36087, 36088, 36089, 36990, 36991, 36992, 36993, 36994, 36995, 36996, 36997, 36998, 36999, 38600, 38601, 38602, 38603, 38604, 38605, 38606, 38607, 38608, 38609, 39410, 39411, 39412, 39413, 39414, 39415, 39416, 39417, 39418, 39419

Let's take the first of these as an example:

27889 is a number such that
27889 - sum of digits (18) = 28782
a palindromic number

Next we can for look numbers meeting the following criterion:

\(n\) is a number such that
\(n\) + sum of digits of \(n\) = a palindromic number

Here is a list of such numbers in the range from 27547 to 40000 (permalink): 

27547, 27651, 27746, 27850, 27945, 28063, 28158, 28262, 28357, 28461, 28556, 28660, 28755, 28954, 29072, 29167, 29271, 29366, 29470, 29565, 29764, 29859, 29963, 29973, 30000, 30086, 30190, 30285, 30484, 30579, 30683, 30778, 30882, 30991, 31095, 31104, 31294, 31303, 31389, 31493, 31502, 31588, 31692, 31701, 31787, 31891, 31900, 32009, 32113, 32199, 32208, 32312, 32398, 32407, 32511, 32597, 32606, 32710, 32796, 32805, 33018, 33122, 33217, 33321, 33416, 33520, 33615, 33814, 33909, 34027, 34131, 34226, 34330, 34425, 34624, 34719, 34823, 34918, 35036, 35140, 35235, 35434, 35529, 35633, 35728, 35832, 35927, 36045, 36244, 36339, 36443, 36538, 36642, 36737, 36841, 36936, 37054, 37149, 37253, 37348, 37452, 37547, 37651, 37746, 37850, 37945, 38063, 38158, 38262, 38357, 38461, 38556, 38660, 38755, 38954, 39072, 39167, 39271, 39366, 39470, 39565, 39764, 39859, 39963, 39973, 40000

Let's take 27547 as an example:

27547 is a number such that
27547 + sum of digits (25) = 
27572
a palindromic number

What about numbers that result in palindromes when the sum of digits is subtracted and added? We are looking for numbers with these criteria:

\(n\) is a number such that
\(n\) - sum of digits of \(n\) = a palindromic number
\(n\) + sum of digits of \(n\) = a palindromic number

There are 23 such numbers in the range up to 40000 with some but not all being palindromic themselves (permalink):

1, 2, 3, 4, 10, 100, 105, 181, 262, 267, 343, 348, 424, 429, 681, 762, 767, 843, 848, 924, 929, 1000, 10000

Let's take 1000 as an example:

1000 is a number such that
1000 - sum of digits (1) = 999
1000 + sum of digits (1) = 1001
both are palindromic numbers

I've written about sequences arising from numbers in combination with their sum of digits (SoD) or product of digits (PoD) in earlier posts such as:
I've also written extensively about palindromes in posts such as:

Monday, 29 July 2024

Some Special Sphenic Numbers

What struck me about the number associated with my diurnal age today was that it is sphenic and all three factors as well as the number itself share one digit in common, namely the digit 1. The number is:$$27511=11 \times 41 \times 61$$This got me wondering how many sphenic numbers in the range up to 40,000 have this property. Well it turns out that 78 numbers do. These numbers are (permalink):

1

2431, 2717, 4199, 6851, 9061, 10013, 10127, 10153, 11407, 12749, 13243, 13277, 13481, 13981, 14443, 14729, 14839, 15067, 15301, 15587, 15691, 16159, 16523, 17537, 18161, 18733, 18887, 19261, 19591, 19703, 19877, 20801, 21109, 21131, 21307, 21527, 21593, 21607, 22321, 22451, 22781, 23617, 23881, 24149, 24211, 25441, 25619, 27313, 27511, 27911, 28171, 28613, 28951, 29051, 30173, 30481, 30719, 31141, 31229, 31369, 31559, 32021, 32147, 32351, 32513, 32813, 33371, 34441, 34561, 35123, 35717, 36091, 36157, 37169, 37213, 37411, 37417, 39919

Naturally, I decided to investigate the remaining digits from 2 to 9. Here is what I found. 

2

For the digit 2, there are 22 numbers that are sphenic and in which all three factors as well as the number itself share the digit 2 in common. The first such number is 5842:$$5842=2 \times 23 \times 127$$These numbers are (permalink):

5842, 10258, 10442, 11822, 12098, 12238, 12374, 12466, 12742, 12926, 12934, 13282, 13862, 15254, 15602, 16298, 23966, 24058, 24418, 30218, 33442, 38042

3

For the digit 3, there are 138 numbers that are sphenic and in which all three factors as well as the number itself share the digit 3 in common. The first such number is:$$5842=3 \times 13 \times 37$$These numbers are (permalink):

1443, 2139, 2553, 3237, 3441, 3657, 3999, 4773, 5037, 5343, 5883, 6357, 6837, 8103, 9039, 9213, 9321, 9453, 11037, 11063, 11433, 11937, 11973, 12183, 12363, 12543, 13143, 13197, 13287, 13317, 13533, 13611, 13767, 14313, 14937, 15387, 15483, 16377, 17329, 17673, 17931, 18093, 19203, 20397, 20683, 20739, 21183, 21359, 21423, 21783, 21873, 22317, 22839, 23127, 23253, 23907, 23943, 24357, 24753, 25323, 25493, 25737, 25863, 26319, 26381, 26637, 27393, 28137, 28923, 29193, 29739, 30003, 30057, 30147, 30291, 30441, 30567, 30659, 30687, 30783, 30797, 30831, 31341, 31413, 31947, 32097, 32271, 32457, 32523, 32619, 32721, 32829, 33267, 33387, 33449, 33657, 33787, 33927, 34077, 34113, 34131, 34437, 34521, 34611, 34689, 34707, 34743, 34917, 35113, 35187, 35247, 35457, 35619, 35697, 36087, 36177, 36507, 36543, 36593, 36741, 36921, 37047, 37167, 37407, 37789, 37797, 37887, 38001, 38337, 38517, 38739, 38847, 39169, 39183, 39507, 39603, 39849, 39923

4 to 9

There are no numbers in the range up to 40,000 that are sphenic and in which all three factors as well as the number itself share the digit 4 in common. If we consider the range up to one million, we find 20 numbers. The first of these is:$$424883 = 41 \times 43 \times 241$$In the range up to 40,000, there is only one number that is sphenic and in which all three factors as well as the number itself share the digit 5 in common. This is the number:$$15635 = 5 \times 53 \times 59$$There are no numbers in the range up to 40,000 that are sphenic and in which all three factors as well as the number itself share the digit 6 in common. If we consider the range up to one million, we find two numbers. The first of these is:$$666181 = 61 \times 67 \times 163$$There are 14 numbers that are sphenic and in which all three factors as well as the number itself share the digit 7 in common. The first such number is:$$7973 = 7 \times 17 \times 67$$These numbers are (permalink):

7973, 8687, 12173, 12733, 17353, 18907, 19873, 20587, 24017, 27013, 27713, 34237, 37051, 37723

For the digit 8, there are no sphenic numbers that satisfy even in the range up to one million. For the digit 9, there is only one number in the range up to 40,000 that satisfies and that is:$$32509 = 19 \times 29 \times 59$$Before leaving, I'll return to the number that started all this: 27511. It has some other interesting properties involving prime numbers. These are:

  • number + sum of digits is prime: 27511 + 16 = 27527
  • number + product of digits is prime: 27511 + 70 = 27581
  • concatenation of prime factors in ascending order is prime: 114161
  • concatenation 116141 is also prime
The algorithm used earlier can be easily modified (permalinkto accommodate a number of distinct prime factors other than 3. In the case of four distinct prime factors, it is only the digit 3 that yields any numbers in the range up to 40,000. These numbers are:$$33189 = 3 \times 13 \times 23 \times 37 \\38571 = 3 \times 13 \times 23 \times 43$$Once the range is extended to one million, the digits 1, 2, 3, 4, 5, 6, 7, 8 and 9 have 132, 11, 277, 0, 0, 0, 22, 0 and 0 corresponding numbers respectively.

Saturday, 27 July 2024

Special Sums of Squares

There are many positive integers \(n\) with the property that:$$n=x^2+y^2$$where \(x\) and \(y\) are integers but how frequent are integers with the additional property that \(x\) and \(y\) are both different but share the same digits. The first example of such a number is:$$585 = 12^2+ 21^2$$In fact, up to 40000, there are 51 such numbers. They are:

585, 1130, 1553, 1877, 2340, 2826, 3005, 3329, 3977, 4034, 4520, 4941, 5265, 5330, 5913, 6212, 6698, 6885, 7361, 7508, 7685, 8333, 8642, 8874, 9305, 9360, 10170, 10265, 10589, 11237, 12020, 12506, 13653, 13977, 15650, 17525, 22301, 24804, 27185, 27509, 29930, 30416, 32553, 32877, 33525, 35540, 36026, 36836, 38405, 38729, 39377

Here is a permalink that will generate these numbers and their factorisations. The sequence is not listed in the OEIS. I was drawn to investigate the frequency of these sorts of numbers because the number associated with my diurnal age today, 27509, has this property:$$27509=103^2+130^2$$The number also has the property that the difference of 130 and 103 is 27, a cube, and this qualifies the number for membership of OEIS  A282405:


 A282405



Primes \(p = x^2 + y^2\) such that \(x - y \) is a cube greater than one.



The initial members of the sequence are (permalink):

977, 1049, 1289, 1877, 2477, 2609, 3329, 4877, 5669, 6089, 6977, 8429, 9209, 9749, 10589, 12377, 12689, 13649, 15329, 15877, 16657, 17477, 18617, 18913, 19213, 20773, 21377, 21757, 22093, 22433, 22777, 23833, 23909, 25229, 25673, 26053, 26437, 27509, 30497

The first member of this sequence, 977, has the property that:$$ 977=31^2+4^2\\ \text{where } 31-4=27=3^3$$Of course, the difference need not be a cubic number. It could be a square number. In such case, the numbers belong to OEIS A282406:


 A282406

Primes \(p = x^2 + y^2\) such that \(x - y\) is a square greater than one.



The first member of the sequence is 101 with the property that:$$101=10^2-1^2\\ \text{where }10 -1 = 9 =3^2$$This sequence of numbers in not in the OEIS. The 152 initial numbers, up to 40000, are (permalink):

101, 353, 461, 521, 653, 677, 733, 857, 881, 997, 1153, 1237, 1553, 1613, 1901, 2053, 2153, 2297, 2557, 2693, 2713, 2833, 3061, 3313, 3433, 3581, 3593, 4001, 4013, 4273, 4481, 4637, 4813, 5413, 5981, 6037, 6101, 6301, 6473, 6653, 7121, 7393, 7793, 7853, 7877, 8377, 8521, 8893, 9013, 9157, 9221, 9521, 9697, 9781, 9973, 10253, 10313, 10601, 10861, 11093, 11117, 12301, 12601, 12637, 12941, 12953, 13001, 13597, 13841, 14321, 14593, 14813, 15277, 15641, 15901, 16061, 16333, 16421, 16433, 16693, 16981, 17581, 18313, 18553, 18593, 19301, 19333, 19441, 19661, 19717, 19841, 19961, 20113, 20393, 21001, 21401, 21521, 21601, 21737, 21881, 22153, 22573, 23041, 23081, 23857, 24733, 25121, 25541, 25561, 25621, 26261, 26393, 26513, 26993, 27457, 27653, 27701, 28813, 28901, 29501, 29581, 29761, 29837, 30241, 30661, 30817, 30893, 31393, 31541, 31741, 32141, 32321, 32633, 33581, 33713, 34781, 34897, 35153, 36313, 36493, 36541, 36761, 36821, 37853, 38261, 38321, 38393, 38677, 38821, 39233, 39461, 39521

The algorithm is easily modified to accommodate other roots. We need not restrict ourselves to differences. What about sums? Let's consider:

Primes \(p = x^2 + y^2\) such that \(x + y\) is a square greater than one.

The first example of such a number is:$$53=2^2+7^2\\ \text{where }2+7=9=3^2$$There are 83 such numbers in the range up to 40000. They are (permalink):

53, 317, 337, 353, 373, 397, 457, 577, 1213, 1381, 1621, 2213, 3461, 3593, 3701, 3761, 4481, 4793, 5021, 5393, 5801, 7333, 7433, 7541, 7741, 7933, 8081, 8161, 8521, 9181, 9433, 10133, 10601, 11833, 12421, 13933, 14293, 14321, 14341, 14401, 14461, 14593, 15121, 15581, 16141, 16661, 17093, 17401, 18793, 19181, 19381, 19793, 20441, 21601, 22093, 22861, 24793, 25373, 25457, 25577, 25733, 25793, 25997, 26153, 26237, 26293, 26417, 26513, 26717, 26921, 27241, 27893, 28277, 28433, 29453, 31253, 32633, 33377, 33893, 34157, 35537, 36713, 38273

Similarly we could consider numbers such as:

Primes \(p = x^2 + y^2\) such that \(x + y \) is a cube greater than one.

The first example of such a prime is:$$389=10^2+17^2\\ \text{where }10+17=27=3^3$$The sequence of such numbers is not in the OEIS. There are 27 such numbers in the range up to 40000. They are (permalink):

389, 449, 509, 677, 7817, 7853, 7873, 7993, 8233, 8293, 8573, 8737, 9013, 9437, 10193, 10333, 10477, 11093, 11257, 11597, 11953, 12517, 12713, 13537, 14197, 14657, 15377


Thursday, 25 July 2024

A Multiplicity of Digits: Part 2

A variation on the theme of my previous post, that also involves the multiple occurrence of the same digits, are these numbers that comprise a sequence that I've referenced as S107 in my Bespoken for Sequences database. 

Sphenic numbers containing the digit 3 whose three prime factors also contain the digit 3 and whose additive digital root is 3.

The first example of such a number is 1443 = 3 * 13 * 37 with a digital root of 3. There are 61 such numbers in the range up to 40000. Here is the list (permalink):

1443, 3441, 3657, 3999, 4773, 6357, 8103, 9039, 9453, 11037, 11433, 11937, 11973, 13143, 13197, 13287, 13611, 14313, 15483, 17931, 18093, 20397, 20739, 21423, 21783, 21873, 23907, 23943, 24357, 24753, 26319, 28137, 29739, 30441, 30567, 30783, 31341, 31413, 32097, 32457, 32619, 33267, 34077, 34113, 34131, 34437, 34689, 34707, 34743, 35247, 35697, 36507, 36543, 36741, 36921, 37047, 37407, 38001, 38739, 38847, 39603

A twist on this theme is to consider sphenic numbers that do NOT contain the digit 3. Such numbers could be considered as having a hidden multiplicity of digits because the prevalence of the digit is not immediately obvious. The same could be said of the numbers just mentioned but those cases the repeating digit is overtly visible. Here is the revised criteria:
Sphenic numbers NOT containing the digit 3 whose three prime factors also contain the digit 3 and whose additive digital root is 3.

The first such number is 1209 = 3 * 13 * 31 with a digital root of 3. There are 45 such numbers in the range up to 40000. Here they are (permalink):

1209, 1677, 2847, 4017, 5421, 5727, 6789, 7527, 7797, 8697, 9417, 9579, 12207, 12909, 12927, 14547, 14781, 15159, 15429, 16077, 16491, 16887, 17121, 17949, 17967, 18057, 18147, 20217, 20829, 21027, 21459, 22557, 24609, 24771, 24897, 25077, 26247, 26427, 26841, 27507, 28551, 28587, 28767, 28821, 29109

Rather than sphenic numbers, with three distinct prime factors, we could consider biprimes or numbers with two distinct prime factors. Firstly let's look at numbers with properities as follows:

Biprimes containing the digit 2 whose two prime factors also contain the digit 2 and whose additive digital root is 2. 

There are 73 such numbers in the range up to 40000. The first of these is 254 = 2 * 127 with a digital root of 2. Here they are (permalink):

254, 542, 2558, 2594, 2846, 3242, 4286, 4322, 4502, 4682, 5042, 5267, 5294, 5582, 5942, 8462, 12242, 12422, 12458, 12494, 12854, 14258, 16526, 17246, 17642, 18254, 18929, 19442, 20486, 21458, 22502, 22574, 23483, 23654, 24014, 24041, 24086, 24194, 24482, 24554, 24842, 24914, 25022, 25094, 25166, 25202, 25238, 25274, 25526, 25562, 25598, 25706, 25778, 25814, 25958, 25967, 26498, 26534, 27254, 27623, 28442, 28451, 28586, 28829, 29693, 29846, 30242, 30521, 32546, 33842, 35246, 36254, 39629

Again we can consider the revised criteria:

Biprimes NOT containing the digit 2 whose two prime factors also contain the digit 2 and whose additive digital root is 2. 

There are 53 such numbers in the range up to 40000 with the first being 1046 = 2 * 523 with a digital root of 2. Here are the numbers (permalink):

1046, 1658, 3683, 4034, 4106, 4178, 4358, 4538, 4574, 4754, 4853, 4934, 5006, 5078, 5114, 5186, 5366, 5438, 5834, 5906, 6509, 6518, 7058, 7454, 7859, 10046, 11054, 11846, 13646, 14438, 14474, 15167, 15446, 16418, 17858, 19658, 30854, 31646, 33401, 34058, 34418, 34598, 35687, 35858, 36434, 36506, 36578, 37046, 37091, 37613, 38414, 38846, 39854

Wednesday, 24 July 2024

A Multiplicity of Digits: Part 1

An interesting property of the number associated with my diurnal age yesterday was the following:$$27505=5 \times 5501$$The property is so obvious that you might miss it at first glance but I noticed it and created a new sequence based on it. It's recorded as S107 in my Bespoken for Sequences database. See Figure 1.

Figure 1

Let's restate the property that members of this sequence have:

Composite numbers containing the digit 5 at least once whose prime factors each contain the digit 5 as well so that, overall, the digit 5 occurs five times.

In the range up to 40000, there are 27 numbers that satisfy this criteria and they are (permalink):

5255, 5755, 7555, 12755, 15635, 17555, 25055, 25295, 25505, 25535, 25565, 25595, 25765, 25855, 26755, 27505, 27515, 27535, 27595, 27655, 27785, 27955, 28255, 28555, 29255, 32755, 35755

Most, with one exception, are biprimes with 5 as one of the two factors:

5255 = 5 * 1051 with total of 5
5755 = 5 * 1151 with total of 5
7555 = 5 * 1511 with total of 5
12755 = 5 * 2551 with total of 5
15635 = 5 * 53 * 59 with total of 5
17555 = 5 * 3511 with total of 5
25055 = 5 * 5011 with total of 5
25295 = 5 * 5059 with total of 5
25505 = 5 * 5101 with total of 5
25535 = 5 * 5107 with total of 5
25565 = 5 * 5113 with total of 5
25595 = 5 * 5119 with total of 5
25765 = 5 * 5153 with total of 5
25855 = 5 * 5171 with total of 5
26755 = 5 * 5351 with total of 5
27505 = 5 * 5501 with total of 5
27515 = 5 * 5503 with total of 5
27535 = 5 * 5507 with total of 5
27595 = 5 * 5519 with total of 5
27655 = 5 * 5531 with total of 5
27785 = 5 * 5557 with total of 5
27955 = 5 * 5591 with total of 5
28255 = 5 * 5651 with total of 5
28555 = 5 * 5711 with total of 5
29255 = 5 * 5851 with total of 5
32755 = 5 * 6551 with total of 5
35755 = 5 * 7151 with total of 5

I then thought about the other digits and a generalisation of the property, namely:
Composite numbers containing the digit \(d\) at least once whose prime factors  each contain the digit \(d\) as well so that, overall, the digit \(d\) occurs \(d\) times.

With the digit 1, it's pretty obvious that no numbers qualify so let's move on to the digit 2 where there are no numbers again that qualify (even in the range up to one million). With the digit 3, there are 448 numbers that qualify so I won't list them here. I'll just provide this permalink instead.

With the digit 4, there are three numbers that qualify: 16441, 18409 and 19049. Their factorisations are as follows (permalink):

16441 = 41 * 401 with total of 4
18409 = 41 * 449 with total of 4
19049 = 43 * 443 with total of 4

The digit 5 we have already covered so let's move on to the digits 6, 7, 8 and 9. Unfortunately in the range up to 40,000, no numbers satisfy but if we extend the range to one million, we find that for the digit 6, three numbers satisfy: 646661, 666181 and 766643 with factorisations as follows (permalink):

646661 = 61 * 10601 with total of 6
666181 = 61 * 67 * 163 with total of 6
766643 = 461 * 1663 with total of 6

For the digit 7, there are 10 numbers that qualify, namely 371777, 578977, 616777, 677777, 727679, 731773, 748177, 774769, 777767 and 777773. Their factorisations are as follows (permalink):

371777 = 7 * 173 * 307 with total of 7
578977 = 7 * 107 * 773 with total of 7
616777 = 7 * 17 * 71 * 73 with total of 7
677777 = 571 * 1187 with total of 7
727679 = 37 * 71 * 277 with total of 7
731773 = 7 * 107 * 977 with total of 7
748177 = 37 * 73 * 277 with total of 7
774769 = 277 * 2797 with total of 7
777767 = 17 * 45751 with total of 7
777773 = 709 * 1097 with total of 7

In the range up to one million, there are no numbers that satisfy for the digits 8 and 9.

Tuesday, 23 July 2024

Complex Chicanery


I came across an interesting video on YouTube, uploaded today on a channel named Higher Mathematics that posed the following problem:$$ \text{Solve for } x:\\1^x=5$$Clearly the problem has no solution amongst the real numbers but there turns out to be an infinity of solutions once we introduce complex numbers. The solution (with \(k=1,2,3 \dots \) ) then unfolds:$$\begin{align} e^{i \theta} &= \cos{\theta}+i \sin{\theta}\\e^{i 2k \pi} &= \cos{2k \pi}+i \sin{2k \pi}  \\&=1 \\ \therefore (e^{i 2k \pi)})^x &= 5\\ e^{i 2k \pi x} &= 5 \\\ln {e^{i 2k \pi x} }&= \ln{5} \\i 2k \pi x &= \ln{5} \\x &= \frac{ \ln{5}}{i 2k \pi} \\\ &=\frac{-i \ln{5}}{2k \pi}\end{align} $$The complex numbers for values of x given by \(k=1, 2,3\) are shown in Figure 1. They all map to the point \(5+0i\).


Figure 1

Thus we have a function \( f(x) \) with its domain D being the countably infinite set of points:$$ \left( \Big( 0,\dfrac{-i \ln{5}} {2k \pi} \Big) \text{ where k=1, 2, 3, ...} \right) $$ that maps all these points to \( (5, 0i) \) so that:$$ f(x) \rightarrow (5, 0i) \text{ for all x in D}$$

*********************

Let's look now at a slightly different problem:$$2^x=x$$Right from the start, it can be said once again that there are no real solutions to this equality. This is clear once we graph the line \(y=2^x\) and \(y=x\) where we see that there are no points of intersection. See Figure 2.


Figure 2

This problem was posed on the same YouTube channel mentioned earlier. Here is a link to the video. So how do we find if any complex numbers satisfy this equality? Firstly, we take the natural logarithms of both sides and proceed from there:$$ \begin{align} 2^x &= x \\ \ln{2^x} &= \ln{x} \\ x \ln{2} &= \ln{x} \\ \frac{\ln{x}}{x} &= \ln{2} \\ \frac{\ln{x}}{e^{\, \ln{x}} }&= \ln{2} \\ \ln{x} \, {e^{\, -\ln{x}} } &= \ln{2} \\ -\ln{x} \, {e^{\, -\ln{x}} } &= -\ln{2} \\ W(-\ln{x} \, {e^{\, -\ln{x}} } ) &= W(-\ln{2}) \\ -\ln{x} &= W(-\ln{2} ) \\ \ln{x} &= -W(-\ln{2}) \\ x &= e^{-W(-\ln{2})} \\ x &= \frac{1}{e^{W(-\ln{2})}} \\ x &\approx -0.37927 - 0.72087 i\end{align}$$where W is the Lambert W function that I've written about in previous posts. See The Omega Constant and the Lambert W Function (June 24th 2020) and More on the Lambert W Function (February 16th 2021). To evaluate \(x\) using Wolfram Alpha the command ProductLog[-ln(2)] needs to be used.

Monday, 22 July 2024

Reversible Seven Factor Numbers

In an recent post titled Remarkable Reversals on June 45h 2024, I covered some of the content that will appear in this current post but here I'll focus more on the actual factorisations of the reversible numbers that can be found in the range up to 40,000. This is the range that most interests me because numbers associated with a person's diurnal age fall within this range.

There are numbers with seven factors (counted with multiplicity) that, when reversed, produce new numbers that also have seven factors (again counted with multiplicity). The number associated with my diurnal age today is one such number. That number is 27504 with the following property:$$ \begin{align} 27504 &= 2^4 \times 3^2 \times 191 \\ 40572 &= 2^2 \times 3^2 \times 7^2 \times 23 \end{align}$$The numbers up to 40,000 with this property are shown below with factorisations of numbers and reversals shown in Figure 1:

8820, 21240, 21708, 21780, 21920, 23280, 23472, 23625, 23800, 25560, 25584, 25758, 26280, 27432, 27504, 27888, 27900, 28836, 29250, 29403, 29736, 29970, 30492, 34884, 36828


Figure 1: permalink

In the range up to 40,000, there are only only three numbers with eight factors such that their reversals also have eight factors. These are 16560, 25515 and 27864 with factorisations shown in Figure 2.


Figure 2: permalink

In the range up to 40,000, there are four numbers with nine factors such that their reversals also have nine factors. These number are 21168, 23424, 23616 and 27456 with factorisations shown in Figure 3.


Figure 3: permalink

For ten factors and beyond, there are no numbers in the range up to 40,000. In my earlier post (Remarkable Reversals), I focused in particular on the number nine factor number 27456 because it has the interesting property that:$$ \begin{align} 27456 &=2^6 \times 3 \times 11 \times 13 \\65472 &=31 \times 11 \times 3 \times 2^6 \end{align}$$

Friday, 19 July 2024

Another Mid-Millenium Number

On Saturday 23rd of October 2021, I made a post titled Counting People with Mid-Millennium Numbers in which I examined my diurnal age of 26500 on that date. Now, almost three years later, I've reached another "milestone": 27500.


As I said in that post, mid-millennial numbers are popular rounding numbers for populations of towns and islands or communities with common interests or characteristics. These are to be preferred to millennium numbers such as 27,000 or 28000 that appear a little too "approximate" (having only two significant figures as opposed to the three of 27,500). Such numbers are also popular with a wide variety of quantities such as tonnage, money and distances.

The 30 divisors of 27500 are 1, 2, 4, 5, 10, 11, 20, 22, 25, 44, 50, 55, 100, 110, 125, 220, 250, 275, 500, 550, 625, 1100, 1250, 1375, 2500, 2750, 5500, 6875, 13750 and 27500. It's special in the sense that all the digits (apart from 0) are prime. This won't occur again until 30500. As with the previous mid-millennial number, the number appears frequently in population statistics. Here are some examples:
  • Published today, the NHS Workforce Race Equality Standard shows Black and minority ethnic (BME) staff make up almost a quarter of the workforce overall (24.2% or 383,706 staff) – an increase of 27,500 people since 2021 (22.4% of staff).

  • The Portuguese Grand Prix of Formula 1, which will be played between Friday and Sunday, will have a maximum capacity of 27,500 spectators, according to the government dispatch published today, October 21, in Diário da República.

  • More than 27,500 people in Gaza have already been killed over the past four months, according to Gaza’s Ministry of Health. Further fighting in Rafah risks claiming the lives of even more people. It also risks further hampering a humanitarian operation already limited by insecurity, damaged infrastructure and access restrictions.

  • The anonymous online study, ‘The Global Brain Health Survey’, involved more than 27,500 people worldwide and was led by the Norwegian Institute of Public Health in collaboration with the University of Oslo. 

  • Kirchberg’s resident population is expected to grow almost six-fold over the next 20 years, according to projections from the Fonds Kirchberg.The body responsible for coordinating the development of one of the capital’s business districts forecasts that there will be 23,700 people living in the area by 2040, up from 4,000 in 2020. It suggests that the district’s maximum capacity would be capped at 27,500 beyond 2040.

  • The Kenyan government says it has set up more than 100 camps to house over 27,500 people displaced by flooding.According to government data, more than 190,000 people have so far been affected by the floods and at least 210 are known to have died.
The aliquot sequence for 27500 has a length of 206 steps which are:

[27500, 38104, 40016, 40708, 30538, 15272, 14968, 13112, 13888, 18624, 31160, 44440, 65720, 89800, 119450, 102820, 119444, 105760, 144476, 121804, 97380, 198552, 297888, 518592, 909904, 998456, 889384, 795416, 774784, 768986, 444454, 261146, 141274, 100934, 52186, 27194, 13600, 21554, 13306, 6656, 7666, 3836, 3892, 3948, 6804, 13580, 19348, 19404, 42840, 125640, 283860, 633420, 1562004, 2535180, 5206260, 9371436, 12495276, 20190804, 26921100, 55087540, 60803732, 56587948, 45117684, 69280236, 116780184, 208518216, 312777384, 469166136, 772745304, 1187955816, 1781933784, 2716157736, 4851795384, 8337024936, 14614443864, 27722614536, 48023931924, 82013245164, 134692975476, 205780934846, 107492498242, 53746249124, 42348933724, 35852825156, 27118586620, 29830445324, 24116652916, 18087489694, 10639699874, 5379726934, 2706299954, 1471210894, 735605450, 632620780, 816656420, 898322104, 809756216, 781610824, 685415096, 602212744, 711287846, 355643926, 246590714, 123608986, 61804496, 72770224, 68943920, 91350880, 128146160, 170324320, 242956688, 264953512, 248965388, 248965444, 290225852, 310243108, 343261436, 345226084, 363478556, 363478612, 383892908, 438979156, 520540076, 520540132, 539131250, 616169806, 498886994, 249443500, 314159540, 346712980, 406492340, 486797260, 537866996, 403400254, 201700130, 166294750, 145009490, 131361862, 68478170, 54782554, 27444794, 17643046, 8821526, 6384874, 3696566, 1888594, 944300, 1555540, 2282924, 2282980, 3442460, 4965604, 5062876, 6042092, 6693988, 8128904, 9877396, 8355308, 7779412, 5834566, 2942234, 1471120, 2600048, 3337072, 3287504, 3661456, 3432646, 2557142, 1826554, 1027814, 519394, 259700, 408226, 345758, 246994, 164846, 111634, 55820, 61444, 46090, 44630, 35722, 19034, 10534, 6026, 3478, 1994, 1000, 1340, 1516, 1144, 1376, 1396, 1054, 674, 340, 416, 466, 236, 184, 176, 196, 203, 37, 1, 0]

With a logarithmic vertical axis, the trajectory has a pleasing mountain-like appearance. See Figure 1.


Figure 1

The Collatz trajectory of 27500 has 90 steps and, with a logarithmic vertical axis, its trajectory has a noticeably jagged appearance (see Figure 2):

[27500, 13750, 6875, 20626, 10313, 30940, 15470, 7735, 23206, 11603, 34810, 17405, 52216, 26108, 13054, 6527, 19582, 9791, 29374, 14687, 44062, 22031, 66094, 33047, 99142, 49571, 148714, 74357, 223072, 111536, 55768, 27884, 13942, 6971, 20914, 10457, 31372, 15686, 7843, 23530, 11765, 35296, 17648, 8824, 4412, 2206, 1103, 3310, 1655, 4966, 2483, 7450, 3725, 11176, 5588, 2794, 1397, 4192, 2096, 1048, 524, 262, 131, 394, 197, 592, 296, 148, 74, 37, 112, 56, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1]


Figure 2

Here are some other interesting facts about the number:
  • The Anti-Divisors of 27500 are [3, 7, 8, 9, 21, 27, 40, 63, 81, 88, 97, 189, 200, 291, 440, 567, 679, 873, 1000, 2037, 2200, 2619, 5000, 6111, 7857, 11000, 18333]

  • The Arithmetic Derivative of 27500 is 52000

  • The Maximum - Minimum Recursive Algorithm for 27500 produces [27500, 74943, 62964, 71973, 83952, 74943]

  • The Minimal Goldbach decomposition of 27500 is 13 and 27487

  • The number of steps required is to reach home prime is 7:
    [27500, 22555511, 1110511951, 3313355021, 31337105733, 3373163729137, 4936768328311, 101312973757451]

  • 27500 has Odds and Evens Trajectory of length 12 and is [27500, 27510, 27521, 27530, 27543, 27552, 27565, 27574, 27587, 27596, 27609, 27617, 27624, 27617]
For the previous mid-millennial day see Counting People with Mid-Millennium Numbers.

Thursday, 18 July 2024

Binomial Expansion Using Modular Arithmetic

 1

1    1

1    2    1

1    3    3    1

1    4    6    4    1

1    5    10    10    5    1

1    6    15    20    15    6    1

1    7    21    35    35    21    7    1

Above we see the beginning of Pascal's Triangle, that is of great assistance is working out the coefficients of the terms in the binomial expansion of \( (a+b)^n \) for various positive integer values of \(n\). The first line corresponds to \(n=0\), then \(n=1\), \(n=2\) and so on. For example:$$(a+b)^4=a^4+4a^3b+6a^2b^2+4ab^3+b^4$$A common mistake that's made by beginner's is to write the following:$$(a+b)^n=a^n+b^n$$What is regarded as a mistake actually turns out to true for certain values of \(n\) when modular arithmetic is involved.

Let's consider mod 2 where only two numbers exist: 0 and 1. Any numbers larger than 1 reduce to either 0 or 1. Thus \(2 \equiv 0 \, mod \, 2\) and \(3 \equiv 1 \, mod \, 2\) etc. Let's look at the expansion of \( (a+b)^2 \) in this light. We have:$$ \begin{align} (a+b)^2 &=a^2+2ab+b^2\\ &=a^2+b^2 \end{align}$$In the case of mod 2, the \(2ab\) term must equal zero What about mod 3? The only numbers here are 0, 1 and 2 with \(3 \equiv 0 \,mod \,3 \). The binomial expansion for the case of \(n=3\) becomes:$$ \begin{align} (a+b)^3 &=a^3+3a^3b+3ab^2+b^3\\ &=a^3+b^3 \end{align}$$Here the \(3a^2b\) and \(3ab^2\) terms equal zero. We seem to on a roll. Let's consider the case of \(n=4\) or mod 4. Here the only numbers are 0, 1, 2 and 3 with \(4 \equiv 0 \, mod \, 4\), \(5 \equiv 1 \, mod \, 4\), \(6 \equiv 2 \, mod \, 4\) and so on. Thus we have:$$ \begin{align} (a+b)^4 &= a^4 + 4a^3b+6a^2b^2+4ab^3+b^4\\ &=a^4 + 2a^2b^2+b^4 \end{align}$$In this case, things don't quite work out because the middle term \(6a^2b^2\) after conversion to \(2a^2b^2\).

What about the case of \(n=5\) or mod 5? Here the numbers are 0, 1, 2, 3 and 4 and the expansion of \( (a+b)^5\) works out as follows:$$ \begin{align} (a+b)^5 &= a^5 + 5a^4b + 10a^3b^2+10a^2b^3+5ab^4+b^5 \\ &=a^5+b^5 \end{align}$$The central terms all disappear because \(5 \equiv 0 \, mod \,5\) and \(10 \equiv 0 \, mod \, 5\). If we consider the case of mod 6, the simplification fails but works again for mod 7. The generalisation from all of this is that if \(p\) is prime and we are working with mod \(p\) then the following always holds true:$$(a+b)^p=a^p+b^p$$I'm thankful to this YouTube video for informing me of this interesting twist on the binomial expansion.

Area of Triangle Using Matrices and Determinants

I watched an interesting YouTube video explaining how to use matrices and determinants to find the area of a triangle given its vertices. Of course, one could use the distance formula to find the lengths of the sides and then use Heron's formula to find the area but this method is far quicker as we'll see.

The first example used in the video involved the points (1,1), (4,1) and (4,5). These coordinates are used to form a 3 x 3 matrix with the x coordinates forming the first column, the y coordinates forming the second column, and the third column consisting of three 1's. The result is as shown below:$$ \begin{bmatrix} 1 & 1 & 1 \\ 4 & 1 & 1\\ 4 & 5 & 1 \end{bmatrix} $$The determinant of this matrix is 12 and the area of the triangle is simply half the value of the determinant, namely 6. The coordinates were chosen by the author of the video so that the the triangle formed by the vertices is right-angled and its area quickly calculated. See Figure 1.


Figure 1: f = 3 units and g = 4 units
and so area is  3 x 4 / 2 = 6 square units

Here is a permalink to a SageMath algorithm that will calculate the area form the coordinates of the input vertices. The second example in the video involved the vertices (2, 3), (5, 7) and (10, -5). This produces the following matrix:
$$ \begin{bmatrix} 2 & 3 & 1 \\ 5 & 7 & 1\\ 10 & -5 & 1 \end{bmatrix} $$This matrix has a determinant of -56 and we take half of its absolute value to calculate the area of the triangle to be 28 square units. See Figure 2.


Figure 2

The video goes through the process of finding the lengths of f, g and h using the Pythagorean theorem and then using Heron's formula to find the area. This is done to confirm that matrix/determinant method actually works so I won't reproduce that here. Suffice to say that once the matrix M is constructed, we can say that:$$\text{Area of Triangle }=\frac{1}{2} \times \text{ det } |M|$$This got me thinking about quadrilaterals and whether this method could be extended to find the area of quadrilaterals but it doesn't appear to. The quadrilateral would need to be broken up into two triangles and the area of each calculated using the matrix/determinant method.