Showing posts with label date format. Show all posts
Showing posts with label date format. Show all posts

Sunday, 18 October 2026

More on Days and Dates

In two recent posts, When Days and Dates Align (8th October 2026) and Numbers as Dates (29th April 2026), I've treated my diurnal age's connection with dates using a DD-M-YY or D-M-YY format with the YY being mandatory though ambiguous. As an example, my diurnal age today is 28322 and so in this scheme would be interpreted as 28th March 2022 if we were looking for a date closest to the current date of 18th October 2026).

Another option is to consider a YY-M-DD or YY-MM-D format. Using this format the year changes slowly and today's date would be considered to be 22nd March 2028. This is probably the better format and using this I posed Gemini the following problem:

Today I’m 28322 days old counting my birthday on April 3rd 1949 as Day 0. Interpreting 28322 as YY-M-DD format gives 22nd March 1928. Not 22nd March 2028 because that date is in the future. As my diurnal age increases by 1 each day, when will I reach a number that, interpreted in YY-M-DD or YY-MM-D format, will be in the past. I want the number and its associated date.

Here was its response:

The number is \( \textbf{29201}\), and you will reach it on \( \textbf{15 March 2029}\).

When you are 29,201 days old on 15 March 2029, hyphenating the number in YY-M-DD format gives 29-2-01, which is 1 February 2029—a 21st-century date that is 42 days in the past at that moment.

Here is why no earlier number works:

  • 28801 to 28930 (9 February – 17 June 2028): These are the only valid dates in the 28xxx series left, and they represent August and September 2028—which are still months in the future when you reach those ages.

  • 29000 (26 August 2028): Your day count rolls into the 29xxx series while it is still 2028, so 29 remains in the future for the rest of that year.

  • 29101 to 29131 (5 December 2028 – 4 January 2029): Even when 2029 begins on 1 January 2029 (when you are 29128 days old), 29-1-28 (28 January 2029) and 29-12-8 (8 December 2029) are still ahead of you, as are 29129, 29130, and 29131.

  • 29132 to 29200 (5 January – 14 March 2029): None of these 69 numbers can form a valid calendar date in either YY-M-DD or YY-MM-D format.

  • 29201 (15 March 2029): The very first valid date after that gap is 29-2-01 (1 February 2029), making it the first 21st-century date that lies in the past.

All of this is just some silliness to entertain myself. 

Thursday, 8 October 2026

When Dates and Days Align

I put this little problem to Gemini:

A person is born on April 3rd 1949. The day that he is born is reckoned as Day 0 and for every subsequent day 1 is added and this count becomes his diurnal age. Let the number associated with any date be determined as DDMYY where DD is the number associated with the month(1 to a maximum of 31), M is the month (from 1 to 9) and YY is the last two digits of the current year. Thus a date of 14th September 2026 would become 14926. Is there any date, using this system, where the diurnal age equals the date?

Here was its response:

September 23, 2014, is the sole date where the diurnal age mathematically equates to its DDMYY numerical representation. 

That is interesting and so, on the 23rd of September 2014, I was 23914 days old. I got Gemini to write a program that would accept any birthdate as input using this prompt:

Can you write a program in SageMath that will accept any birthdate as input and from there calculate if there is a date where the diurnal age equals the date number using DDMYY format. Let’s realistically limit the person’s possible age to less than 100.  

Here is a permalink to the program and the result for the following birthdate:

  • 23rd August 1964:
    Match found: 05 February 1979 | Diurnal Age / Date Number: 5279
However, I realised that I could be less restrictive with the date format and modified the prompt as follows:
I’d like to modify the program so the acceptable date format can be DMMYY, DDMYY or DMYY. This ensures that the resultant number derived from the date is always less than six digits. Everything else remains the same.

Here is a permalink to the modified program which produces the same results for the two dates examined above. Here are some additional dates:

  • 23rd November 1980:
    Match found: 06 July 1999 | Diurnal Age: 6799 | Date Format: 6799
    Match found: 16 January 2025 | Diurnal Age: 16125 | Date Format: 16125

  • 6th October 2002:
    Match found: 10 September 2032 | Diurnal Age: 10932 | Date Format: 10932

So just a little curiosity. Not all birthdates yield a result within the span of 100 years. You could ask the person born on the 6th October 2002: h
ow many days old will you be on the 10th September 2032? Don't know? Here's a way to find out:
  • 10th \( \rightarrow\) 10
  • September \( \rightarrow\) 9
  • 2032 \( \rightarrow\)  32
  • Concatenation \( \rightarrow\) 10932 \( \rightarrow\) your diurnal age!

Tuesday, 30 June 2026

Midpoint of the Year

On the 7th August 2021, I made a post title Key Points in the Year and Figure 1 is an extract from that post:


Figure 1

In that post I failed to mention that the exact midpoint of a common or non-leap year occurs at noon on the 2nd of July. As today is June 30th, that point is now not far off. In leap years, the midpoint occurs at midnight on the 2nd of July. This middle day can be written as \( \textbf{20260702} \) using YYYYMMDD format or \( \textbf{2026183} \) using the year and the number of days that have elapsed in it. 

Both formats uniquely define any date but I prefer the latter for the purposes of number analysis. Unfortunately, feeding both of these numbers into my daily number analysis program caused the wheels to spin and the analysis didn't complete. The program handles the five digit numbers associated with my diurnal age but seven and eight digit numbers are too much for my M1 Macbook Air's processor to handle.

However, 2026183 is prime and its reciprocal has a period of 2026182. It forms a twin prime pair with 2026181. It's interesting to consider how many times 183 leads to primes when concatenated with a range of years from 2000 to 2100. Here are the years:

2005, 2006, 2011, 2014, 2015, 2018, 2021, 2023, 2026, 2030, 2041, 2047, 2069, 2093, 2098

Of these, only 2005, 2026 and 2047 form twin prime pairs when both 181 and 183 are concatenated with them.

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, 14 March 2023

Hidden Connections

In a separate blog of mine, I was writing about the introduction of a Central Bank Digital Currency or CBDC as it's most conveniently referred to. Whenever I see letters, I also see numbers. Such is my affliction. The numbers I see lie behind the letters when they are viewed as placeholders for numbers in non-decimal bases. In the case of CBDC, the obvious number base to consider is hexadecimal, base 16.

Bases of 14 and 15 are possible but they are not commonly used whereas hexadecimal is ubiquitous. So what decimal number does a hexadecimal CBDC convert to then. The answer is 52188. What are the hidden connections I refer to? Well, the connection lies in its factorisation which is \( 2^2 \times 3 \times 4349 \).

The connection is only apparent to me because I'm born on April 3rd 1949 which can be written as 4-3-49 in date notation and compressed to 4349. The smaller initial factors \(2^2=4\) and \(3\) reinforce this. I'm not suggesting any deep connection between myself and CBDC.  I'm just pointing this out as a mathematical curiosity. 

It's interesting to me to be able to see numbers lurking behind words and letters. See my recent post: Elements, Letters and Numbers. I also find it interesting to see dates as numbers and numbers as dates. See my recent posts: The Julian Day Number, Special Numbers, Special Dates, Turning Dates Into Numbers.

Getting back to my birthdate and birthdates in general, it can be observed that birthdates or any dates can be interpreted as numbers in the following ways using my birthdate as the example:

  • DD - MM - YY with leading zeros and intermediate zeros optionally omitted.

    For example, 03 - 04 - 49 --> 30449 or, as it's said, "third of the fourth forty nine" (3449)

  • MM - DD - YY with leading zeros omitted and intermediate zeros optionally omitted.

    For example, 04 - 03 - 49 --> 40349 or, as it's said, "fourth of the third forty nine" (4349)

  • DD - MM - YYYY

    For example, 03041949 --> 3041949 or, as it's said, "third of the fourth nineteen forty nine" (341949)

  • MM - DD - YYYY

    For example, 04 - 03 - 1949 --> 4031949 or, as it's said, "fourth of the third nineteen forty nine" (431949)

  • YYYYMMDD

    For example, 19490403 and intermediate zeros are not usually dropped here. It's this format that I focused on in my blog titled Turning Dates into Numbers back in January of 2023.
Of these various representations, only three are prime:

3 - 4 - 49 = 3449 = 3449
3- 04 - 49 = 30449
4 - 3 - 49 = 4349
4 - 03 - 49 = 157 * 257
3 - 4 - 1949 = 3 * 113983
3 - 04 - 1949 = 3 * 43 * 23581
4 - 3 - 1949 = 3 * 7 * 67 * 307
4 - 03 - 1949 = 3 * 1343983
1949 - 04 - 03 = 3 * 167 * 38903