Showing posts with label leap year. Show all posts
Showing posts with label leap year. Show all posts

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, 29 April 2026

Numbers as Dates

When I turned 28000 days old, there was no way to turn this number into a date until I reached 28100 days old. At this point, it's possible via this stratagem:

28 - 1 - 00 --> 28th January 1900

There is ambiguity here because 00 could be interpreted as representing 2000 but I'll stick with 1900 for reasons that I'll make apparent. Yesterday I turned 28149 days old which converts as follows:

28 - 1 - 49 --> 28th January 1949

Hmmm. On that date, I was not yet born although I was a seven month old foetus. However, today I'm 28150 days old and this converts as follows:

28 - 1 - 50 --> 28th January 1950

Now by that date I had been born and was about ten months old. The interesting thing is that when I turn 30449 days old, this can be made to correspond to my birthday in the following way:

3 - 04 - 49 --> 3rd April 1949

There's ambiguity here because 30449 can also be made into another date:

30 - 4 - 49 --> 30th April 1949

All this requires that we admit to leading zeros when we want them, omit them when we don't and make choices to suit ourselves when confronted with competing alternatives. In other words, flexibility is required. This process is not continuous. It works until I exceed 28999 since:

28 - 9 - 99 --> 28th September 1999

However, 29000 doesn't work and this number to date conversion only becomes possible again when I reach 29100 since:

29 - 1 - 00 --> 29th January 1900

With the leading two digits being 29, care must be taken with leap years and February. What happens with 29200?

29 - 2 - 00 --> 29th February 1900

Is the 29th of February 1900 a valid date? It is if 1900 were a leap year but it's not since it's not divisible by 400. If we interpret the date as 29th February 2000 however, then the date is valid since 2000 was a leap year. Sticking with the twentieth century convention, valid dates only arise with 29204, 29208, 29212, ... , 29288, 29292, 29296.

After reaching 29300, there's no problem with the leading two digits being 29 and things will be fine until I reach 30000. The number to date conversion will kick in again at 30100 and I'll reach 30449 without any gaps. All this is hardly serious mathematics but fun nonetheless. 

In all of this, I've adopted a day - month - year format switching between DD-M-YY and D-MM-YY as it suits me. This works well whereas other formats lead to lots of inadmissable dates and aren't as much fun.

Tuesday, 8 November 2022

Reversible Sphenic Numbers

There is the reversible prime, known as an emirp. There is the reversible semiprime, known as an emirpimes, and then there is the reversible sphenic number, known as an cinehps. This is a rather ugly term so I'll just use the term reversible sphenic number. An example of an emirp is 17 whose reversal, 71, is also prime. An example of an emirpimes is 26 = 2 x 13 whose reversal, 62 = 2 x 31, is also a semiprime. The first example of a cinehps is 165 = 3 x 5 x 11 whose reversal, 561 = 3 x 11 x 17, is also a sphenic number.

These numbers form OEIS A270175:


 A270175



Cinehps numbers: sphenic numbers whose reversal is a different sphenic numbe
r.

Note that palindromic sphenic numbers are excluded. The initial members of the sequence are:

165, 246, 285, 286, 366, 418, 435, 438, 498, 534, 561, 582, 609, 642, 663, 682, 759, 814, 834, 894, 906, 957, 1002, 1023, 1034, 1066, 1095, 1113, 1131, 1185, 1209, 1239, 1245, 1265, 1311, 1342, 1353, 1374, 1398, 1419, 1443, 1446, 1479, 1515, 1526, 1542, 1545, ...

Up to the one million mark, these numbers total 5.28% of the range. One of the concepts associated with a sphenic number is that of the sphenic brick. Let's consider a sphenic number \(n\) whose factors are \(a,b,c\). The sphenic brick is the three dimensional cuboid with volume of \(n\) cubic units and linear dimensions of \(a,b\) and \(c\) units.

Such a brick has an associated surface area and a thought occurred to me. Are there any reversible sphenic number pairs that each have the same surface area? A little investigation revealed that there are. They are rare birds indeed however, and there are only eight ( in four pairs) in the range up to three million (366 and 663, 3245 and 5423, 3685 and 5863, 921239 and 932129). Here are the details and here is the permalink to the calculation. Surface areas are shown in bold red.

366  = 2 x 3 x 61 --> 622 and 663 = 3 x 13 x 17 --> 622
3245 = 5 x 11 x 59 --> 1998 and 5423 = 11 x 17 x 29 --> 1998
3685 = 5 x 11 x 67 --> 2254 and 5863 = 11 x 13 x 41 --> 2254
921239 = 11 x 89 x 941 --> 190158 and 932129 = 11 x 101 x 839 --> 190158

None of the sphenic bricks associated with these numbers look like bricks because they are all very elongated but that's the term that is used for these shapes. Figure 1 shows that the 11 x 89 x 941 looks more like a plank than a brick.


Figure 1

There may well be more beyond the three million mark but SageMathCell timed out above that. Anyway, fascinating that such numbers exist with the first of them being 366, the number of days in a leap year. It can be noted that 366 is the only even number. Placed in sequence on the number line we have:

366, 663, 3245, 3685, 5423, 5863, 921239, 932129

This sequence of terms could be described thus:

Non-palindromic sphenic numbers which, when reversed, are also sphenic numbers with the members of both pairs having identical sphenic brick surface areas. 

Not surprisingly this sequence does not appear in the OEIS, nor will it, as I have ceased to contribute.

ADDENDUM:

The above idea can be applied to semiprimes as well. In this case we will be working with two dimensional rectangles. The two factors of the semiprime form the length and width of the associated rectangle. In the range up to one million, reversible semiprimes comprise 6.06% of the total range but there are only 26 reversible semiprimes with the property that their associated areas are equal. See permalink for calculation.

The pairs (up to one million) are:

14269 = 19 x 751 --> 1540 and 96241 = 157 x 613 --> 1540
15167 = 29 x 523 --> 1104 and 76151 = 271 x 281 --> 1104
16237 = 13 x 1249 --> 2524 and 73261 = 61 x 1201 --> 2524
18449 = 19 x 971 --> 1980 and 94481 = 107 x 883 --> 1980
18977 = 7 x 2711 --> 5436 and 77981 = 29 x 2689 --> 5436
36679 = 43 x 853 --> 1792 and 97663 = 127 x 769 --> 1792
140941 = 97 x 1453 --> 3100 and 149041 = 103 x 1447 --> 3100
150251 = 347 x* 433 --> 1560 and 152051 = 383 x 397 --> 1560
196891 = 401 x 491 --> 1784 and 198691 = 431 x 461 --> 1784
302363 = 211 x 1433 --> 3288 and 363203 = 263 x 1381 --> 3288
308459 = 173 x 1783 --> 3912 and 954803 = 937 x 1019 --> 3912
319853 = 317 x 1009 --> 2652 and 358913 = 379 x 947 --> 2652
958099 = 761 x 1259 --> 4040 and 990859 = 839 x 1181 --> 4040

It can be noted that all these reversible semiprimes are odd.

If we are even more adventurous we can consider numbers with four distinct factors as being associated with 4-dimensional hypercuboids. When unfolded into 3-dimensions, the eight cuboids are the equivalent of the surface area of our sphenic bricks. In the range up to three million, about 1.48% of numbers are reversible four factor numbers with the first one being 1518 = 2 x 3 x 11 x 23 and 8151 = 3 x 11 x 13 x 19. However, no number pairs emerge with identical volumes of unfolded cuboids. Figure 1 shows an unfolded hypercube and an unfolded hypercuboid will look similar but will have four pairs of cuboids each with different volumes, instead of consisting of eight identical cubes. Permalink (which may need double checking).


Figure 1

Saturday, 8 January 2022

Mathematical Quiz: 1

This post is just a first attempt at creating a mathematical quiz. I'm still thinking about the best way to present such a quiz from the wide variety of online resources available. The target audience is an important consideration. The first seven questions of this particular quiz is accessible to those you have completed a course in high school mathematics. The last three questions however, would not be but would serve to stimulate interest and get them to follow the suggested links. This whole quiz concept is a work in progress so I'll keep experimenting with quiz content and design.

Here is a set of ten mathematical questions that will test your understanding of Mathematics and perhaps help you to learn things of interest in the process. You should not use a calculator (except for Question 6) or reference material to answer these questions. Just rely on your own resources.

Questions:
  1. Evaluate \(2^{3^2}\)

  2. \(\pi\) represents the ratio of a circle's diameter to its circumference while \(e\) is the base of the natural logarithms. What is the product of these two numbers?

  3. Evaluate \( \dfrac{1}{0!}\)

  4. Evaluate \(4 + 8 \div 4 \times 2\)

  5. Will \(2100\) be a leap year?

  6. In a random group of people, how many are needed so that the probability of two people sharing the same birthday is about 50%? You can use a calculator for this problem.

  7. Can you find the smallest integer that can be written as \(x^2+xy+y^2 \) in two different ways with \(x \geq 0\) and \(y \geq 0\)? Hint: it's smaller than 50.

  8. A happy number is one that reduces to 1 with repeated sums of squares of digits. For example, \(13 \rightarrow 1^2+3^2 = 10 \rightarrow 1^2+0^2 = 1\). What happens to numbers that aren't happy?

  9. \(5=2^2+1^2\) but \(7\) can't be written as a sum of two squares. Using this information, try to decide whether the prime number \(1009\) can or cannot be written as a sum of two squares. Hint: use modular arithmetic. 

  10. Who is this German mathematician depicted below? Hint: his first name is Georg. He was born in 1845 and died in 1918.

Answers:

  1.  The rule is that the calculation proceeds from the top downwards and so we calculate \(3^2=9 \) first, then \(2^9=512\). Proceeding from the bottom up, we would evaluate \(2^3=8\) and then \(8^2=64\) but this is incorrect. Thus the answer is 512.

    Comment: I've written about this in a blog post titled Power Towers and Tetration. This is a simple but important principle to understand and is a sort of extension of the BOMDAS rule (Brackets, Of, Multiplication, Division, Addition, Subtraction).

  2. This is definitely a trick question. The answer is \(pie\).

    Comment: there's always room for humour in mathematics, provided it's not overdone. 

  3. It needs to be remembered that \(0!=1\) and thus the answer is 1.

    Comment: many former high school students would remember that zero factorial is 1 so this is not as difficult as it looks.

  4. To prevent mistakes put a bracket around division and multiplication before proceeding from left to right. This gives:

    \(4 + ((8 \div 4 )\times 2)=4 + (2 \times 2)=4+4=8\)

    Comment: this will trick a lot of people but it's still an elementary problem that even an upper level primary student should be able to handle.

  5. End of century years must be divisible by \(4\) and \(100\). While \(2100\) is divisible by \(100\), it is not divisible by \(4\) and thus it is not a leap year.

    Comment: this is not widely known but it should be and so this problem will inform those who weren't familiar with the rule.

  6. This is the famous birthday problem and the answer is 23 people. I've written about this is a blog post titled 23.

    Comment: the number is somewhat counter-intuitive in that it's much smaller than one might expect. It's an interesting problem that doesn't require any high level mathematics but will require a calculator (hence the exemption).

    Here is a brief explanation taken from my previously mentioned blog post:
    • With 23 people we have 253 pairs: \(\dfrac{23 \times 22}{2}=253\)
    • The chance of two people having different birthdays is \(1−\dfrac{1}{365}=\dfrac{364}{365}=0.997260\)
    • Makes sense, right? When comparing one person's birthday to another, in 364 out of 365 scenarios they won't match. Fine. But making 253 comparisons and having them all be different is like getting heads 253 times in a row - you had to dodge "tails" each time. Let's get an approximate solution by pretending birthday comparisons are like coin flips.We use exponents to find the probability:
      • \( \left (\dfrac{364}{365} \right )^{253}=0.4995 \approx 50 \%\)
    • Our chance of getting a single miss is pretty high (99.7260%), but when you take that chance hundreds of times, the odds of keeping up that streak drop. Fast.

  7. The smallest integer is \(49=0^2+0 \times 7+7^2=3^2+3 \times 5+5^2\). Such numbers are called Loeschian numbers and I've written about them in this post.

    Comment: this is easy to work out with a little trial and error.

  8. It shouldn't take too long for someone to realise that numbers that aren't happy end up in the loop {4,16,37,58,89,145,42,20}. I've written about these in a post titled Happy Numbers.

    Comment: the discovery takes just a little trial and error.

  9. All primes of the form \(4k+1\) where \(k \geq 1\) can be written as a sum of two squares. Now \(1009 \div 4\) leaves a remainder of \(1\) so it is of the form \(4k+1\) and can be written as a sum of two squares (\(15^2+28^2\)). I've written about these in a post titled Sum of Two Squares

    Comment: this is a little difficult but the hint to use modular arithmetic should nudge people in the right direction.

  10. His name is Georg Cantor and he is the "father" of set theory. You can read more about him by following this link.

    Comment: the first name is "Georg" and other hints will eliminate the well-known mathematics so some people may guess this because "Cantor" is reasonably well-known.
Since creating this quiz I've modified and improved the questions in various ways, so it's been a useful exercise. I still have to decide on the best way to present them. I may experiment with various formats and report back on this post as I'll use this quiz as the content.

ADDENDUM:

I've made use of QUIZIZZ to create a multiple choice quiz using 9 out of the 10 questions. Question 2 wasn't suitable for multiple choice so I've replaced it with another one involving identification of primes. A negative is that the site requires the setting up of a class and the addition of the quiz to that class as homework. Anyone wanting to take the test needs to set up an account by visiting https://quizizz.com/join/class and then use the class code which is M214707.


There are other negatives. As far as I can tell there is no support for LaTeX and so any mathematical expressions have to be included as images. However, the images are easily imported and display well so it's not a major issue. Any revisions mean that the image must be deleted and a new one imported.

Tuesday, 17 August 2021

More About 366

My previous post was about Compositions of 365 and 366 but just tonight, while playing around with numbers, I came across an interesting property of the number 366. It started out by considering a variation on my odds and evens algorithm that I've written about extensively in previous posts. In that algorithm, starting with any number, the odd digits of the number are added to it and the even digits subtracted to form a new number (unless the odd and even digits cancel out). This process is continued with the new number until a fixed point is reached or a loop is entered.

I thought about what would happen if the product of the digits of a number were added to the number to form a new number and the process repeated until some sort of resolution was reached. The process will clearly terminate once a zero digit appears. I wondered how many repetitions might be required. My investigations of the first 1000 numbers revealed that the maximum number of repetitions was 27 and this occurred with three numbers: 187, 248 and 264.

Here are their trajectories:

187, 243, 267, 351, 366, 474, 586, 826, 922, 958, 1318, 1342, 1366, 1474, 1586, 1826, 1922, 1958, 2318, 2366, 2582, 2742, 2854, 3174, 3258, 3498, 4362, 4506

248, 312, 318, 342, 366, 474, 586, 826, 922, 958, 1318, 1342, 1366, 1474, 1586, 1826, 1922, 1958, 2318, 2366, 2582, 2742, 2854, 3174, 3258, 3498, 4362, 4506

264, 312, 318, 342, 366, 474, 586, 826, 922, 958, 1318, 1342, 1366, 1474, 1586, 1826, 1922, 1958, 2318, 2366, 2582, 2742, 2854, 3174, 3258, 3498, 4362, 4506

Each sequence consists of 28 members and the members of the sequences are identical from 366 onwards. The sequences beginning with 264 and 248 differ only in the initial term but the trajectory of 187 does not meet up with them until 366 and the first four terms are odd (187, 243, 267, 351). After 23 steps, all leading to even numbers, 366 reaches a dead end.

Thus 366 forms a sequence consisting of 24 terms:

366, 474, 586, 826, 922, 958, 1318, 1342, 1366, 1474, 1586, 1826, 1922, 1958, 2318, 2366, 2582, 2742, 2854, 3174, 3258, 3498, 4362, 4506

366 is the first number to generate a sequence of length 24. Up to 1,000,000, the numbers that produce a sequence of this length are:

366, 393, 426, 442, 24567, 24627, 124567, 124627, 158637, 174219, 184441, 273867, 419976, 441136, 441232, 513411, 581746 

Six of the resulting sequences are subsets of the sequences containing 28 terms, described earlier. Getting back to the sequences of maximal length, the numbers up to ten million that lead to sequences of length 28 are:

187, 248, 264, 386776, 874423, 1386776, 3169526, 3175571, 3241862, 3795455, 3829475, 3843299, 4213657, 4241417, 4293567, 4322139, 4446651, 4449531, 4452571, 5113891, 5114811

Thus 187, 243, 248, 264, 267, 312, 318, 342, 351 all lead (directly or indirectly) to 366 on the way to 4506, under the add product of digits to number recursive process. See Figure 1.

Figure 1

Why the maximum length of the sequences should be 28 (consisting of 27 steps leading to a dead end) remains a mystery to me. There's clearly something of significance in the number 27 and maybe I'll dig deeper at a later date.

Saturday, 7 August 2021

Key Points in the Year

Thanks to my newly initiated tracking of the number of days that have elapsed in the current year and the number of days remaining, I noticed that today is quite significant. The date today is August 7th 2021, a non-leap year, and Figure 1 displays the numbers.


Figure 1: source

These numbers, along with 365, factor as follows:
  • 365 = 5 x 73
  • 146 = 2 x 73
  • 219 = 3 x 73


This means that today 60% of the year has passed and 40% remains. It can be seen that earlier in the year, on Wednesday May 26th 2021 to be exact, 146 days had elapsed and 219 days remained. Extending this it can be seen that:
  • 073 = 1 x 73 --> March 14th (20% elapsed and 80% remaining)
  • 146 = 2 x 73 --> May 26th (40% elapsed and 60% remaining)
  • 219 = 3 x 73 --> August 7th (60% elapsed and 40% remaining)
  • 292 = 4 x 73 --> October 19th (80% elapsed and 20% remaining)
Things of course are different during a leap year (the next is 2024) because:
  • 366 = 2 x 3 x 61
  • 366 = 2 x 183
  • 366 = 3 x 122
  • 366 = 6 x 61


It is only day 183 that yields a whole percentage (50%) and this occurs on July 1st of every leap year. However, the leap year divides into multiples of 61 and so we have:
  • 061 = 1 x 61 --> March 1st
  • 122 = 2 x 61 --> May 1st
  • 183 = 3 x 61 --> July 1st (50% elapsed and 50% remaining)
  • 244 = 4 x 61 --> August 31st 
  • 305 = 5 x 61 --> October 31st

Friday, 11 June 2021

Concatenations

Today I turned 26366 days old and yesterday, of course, I was 26365 days old. Each of these numbers have the property that the leading two digits (26) represent the number of fortnights in a year while the final three digits (365 and 366) represents the number of days in non-leap years and a leap years respectively. Incidentally, 26 fortnights represent 26 x 14 = 364 days and so 26364 encodes that fact. Similar pairs of numbers include:

  • 12365 and 12366 where 12 represents the number of months in a calendar year
  • 13365 and 13366 where 13 represents the number of lunar months in a calendar year
  • 52365 and 52366 where 52 represents the number of full weeks in a calendar year
The concatenation of numbers, according to WolframMathWorld, is represented by the symbol \( \parallel \) and thus 26\( \parallel \)366 = 26366. The formula for the concatenation in base \(b\) of two numbers, \(p\) and \(q\), is given by:$$p \parallel q=p \, b^{f(q)} + q \text{ where } f(q)=\left \lfloor \log_b{q} \right \rfloor + 1$$$$ \text{where }f(q) \text{ represents the length of } q$$Let's test this formula out in the case of 26366. We have \(p=26\) and \(q=366\). Clearly the length of \(q\) is 3 but let's check using \( \left \lfloor \log_{10}366 \right \rfloor + 1\). The value of this is indeed 3 so all is good.

When constructing an algorithm, the formula is useful as a way of accomplishing the concatenation without resorting to strings. Figure 1 shows the relevant SageMath code.


Figure 1: permalink

26365 and 26366 have some interesting shared properties. They are both semiprimes and emirpimes :
  • 26365 = 5 * 5273 and 56362 = 2 * 28181
  • 26366 = 2 * 13183 and 66362 = 2 * 33181
In recreational mathematics, there are some interesting applications of concatenation. One of these involves so-called home primes. These are primes obtained by repeatedly factoring the increasing concatenation of prime factors of a given number. I've written about these in an eponymous post on May 2nd 2021. Let's work out the home primes for 26364, 26365 and 26366.

For 26364, we find ten steps are required to reach the home prime: 
 
26364
223131313
792824447
10113956473
21147933443
713589739409
4059117579999
31353039193333
1113305413717887
313175353597790561

For 26365, only six steps are required:

26365
55273
311783
734271
3311787
31764937

For 26366, seven steps are required:

26366
213183
3323687
17195511
35731837
196728069
365576023

The Smarandache–Wellin numbers involve the concatenations of the first prime numbers. These numbers form OEIS A019518:


 A019518

Smarandache-Wellin numbers: a(n) is the concatenation of first n primes (written in base 10).


The sequence begins:

2
23
235
2357
235711
23571113
2357111317
235711131719
23571113171923
2357111317192329
235711131719232931
23571113171923293137
2357111317192329313741
235711131719232931374143
23571113171923293137414347

Of the numbers listed here only 2, 23 and 2357 are prime. The next such number that is prime has 355 digits!

If we concatenate the integers, we create the Champernowne constant, a transcendental real constant whose decimal expansion has important properties. It is named after economist and mathematician D. G. Champernowne, who published it as an undergraduate in 1933. I've written about this constant in an eponymous post on March 22nd 2019. The constant begins 12345678910111213141516 ... 

The Copeland–ErdÅ‘s constant is formed by the concatenation of "0." with the base 10 representations of the prime numbers in order. Its value, using the modern definition of prime, is approximately 0.235711131719232931374143…

There is a reverse integer sequence that comprises OEIS A000422:


 A000422

Concatenation of numbers from n down to 1.             


The sequence begins:

1
21
321
4321
54321
654321
7654321
87654321
987654321
10987654321
1110987654321
121110987654321
13121110987654321
1413121110987654321
151413121110987654321
16151413121110987654321
1716151413121110987654321
181716151413121110987654321

Interestingly, this sequence produces very few primes with the first being when \(n=82\) and the next being \(n=37765\).

We can concatenate the odd, even, triangular, square, cubic and Fibonacci numbers and all of these have associated OEIS sequences. Follow this link for more information.