Friday, December 28, 2018

Kwanzaa Post: Continued Fractions and Calendar Reform

Table of Contents

1. Pappas Question of the Day
2. The Kwanzaa Celebrant in My Class
3. Ogilvy and Continued Fractions
4. Continued Fractions and Calendar Reform
5. Birthdays and Calendar Reform
6. David's Lunar Calendar
7. Continued Fractions and Leap Weeks
8. Calendar Reform and Kwanzaa
9. Continued Fractions and Music
10. Conclusion: "The Twelve Days of Christmath" (Vi Hart) and Carol of the Bells (Mannheim Steamroller)

Pappas Question of the Day

Today on her Mathematics Calendar 2018, Theoni Pappas writes:

A quarter of a big circle is shown & half a small circle. The big circle's area is 224 sq. units. What is the area of the black region?

(Here is some given info from the diagram: the radius of the big circle equals the diameter of the small circle. The small semicircle region is completely contained in the large quarter circle region, and the black region is the difference between them.)

First, we notice that 224 is the area of the entire big circle, not just the quarter circle (even though the entire big circle doesn't appear in the diagram). So the area of the quarter circle is 224/4 = 56.

But what is the area of the small semicircle? We note that its diameter equals the radius of the large circle -- that is, the small radius is half the large radius. Thus the area of the small circle is 1/4 that of the large circle, by the Fundamental Theorem of Similarity (where the ratio of areas is the square of the ratio of the lengths, and 1/2^2 = 1/4). The the area of the small circle is 56, and so the area of the small semicircle is 56/2 = 28.

The black region is the difference between them -- which is also 28. Therefore the desired area is 28 square units -- and of course, today's date is the 28th.

This is one of the two winter break posts that I'm writing this year. Much of the information that I'm posting is cut-and-paste from last winter break, but there are some new sections.

In particular, this is my annual Calendar Reform post. I want to write about two new calendar ideas that I came up with this year -- in fact, it was three weeks ago, back on my birthday.

This post is cut-and-paste from last year's Kwanzaa post. I chose to post today mainly because the last Geometry question on the 2018 Pappas calendar happens to be today. And because it's Kwanzaa, it's only fitting that we find the area of the black region (one of this holiday's three main colors).

The Kwanzaa Celebrant in My Class

Kwanzaa is an African-American holiday, celebrated December 26th-January 1st. (Oops -- I mentioned race in this post, but it's OK because it's vacation time.)

I've written about Jewish holidays in previous posts, especially Rosh Hashanah and Yom Kippur because the LAUSD is closed those days. In New York, schools are closed for both of these Jewish holidays as well as Chinese New Year and the Muslim holiday of Eid al-Fitr. But so far, I've never mentioned Kwanzaa since it has nothing to do with school calendars (except for the fact that all schools are closed for winter break during the seven days of Kwanzaa).

But two years ago, one of the eighth grade girls in my class celebrated Kwanzaa. (I didn't mention this that year -- even during vacation time, I wanted to write about race in only one post -- and that was the big Hidden Figures post, five days after the last day of Kwanzaa.)

The holiday of Kwanzaa is controversial. Part of this is because it's seen as a "made-up" holiday, due to the recency of its establishment -- the creator, Maulana Karenga, is still alive at age 77. But this post will be mainly about the actual student in my class whose family celebrated the holiday.

How, exactly, does one celebrate Kwanzaa anyway? For my student, the major event during the holiday was a dance recital. She spent the entire month of December preparing for the recital, and she invited me to attend her performance during the holiday itself.

At first I wasn't going to attend, since my home is far from the dance hall. But as it turned out, the December paychecks weren't available before winter break began, and the director (principal) invited the teachers to pick up the paycheck at her house -- which is near the dance hall. And so I decided to drive to the dance hall that afternoon -- even though it was hours before the performance, I thought that I might see her arrive to practice for that evening. If I had seen my student, I would have purchased a ticket, but I never saw her. It was possible that she would have been performing on one of the other six nights of the holiday, and so I decided not to purchase the ticket.

The name Kwanzaa comes from the language of Swahili ("first (fruits)"), and the names of the seven principles associated with the holiday also come from this language. (Swahili is also the language spoken by many characters in the movie Lion King -- the phrase "Hakuna Matata" comes from this language, and the name of the main character, Simba, means "lion.") The principle associated with today, the third day of Kwanzaa is Ujima, which means "collective work and responsibility." (As it turned out, our school also associated each month with a principle, and the December principle, "creativity," was also the sixth principle of Kwanzaa, Kuumba.)

For the sake of my eighth grader, I decided to mention one of the seven principles during each of the last seven school days before winter break (December 6th-14th). The history teacher had announced that there would be a party on the last day of school, December 14th. I was considering hosting my own party in class that day and calling it a Karamu -- the Kwanzaa feast. I might have asked my student what she normally eats during the holiday (probably some sort of soul food), and then I'd bring enough of it for all 14 of my eighth graders to eat.

But then something terrible happened. Ironically, it occurred on December 8th, the day I told my students about the third principle of Ujima, since the students collectively lacked responsibility. (I never mentioned this incident on the blog, since I didn't post on December 8th that year, and I wrote about other things the rest of that week.)

It was during IXL computer time. The eighth graders were supposed to get laptops in order to begin the IXL assignment. But one student -- and I never did figure out who it was -- decided to start flicking the lights on and off. Then a second student started playing with the lights, then a third person, and so on.

While this was happening, two seventh graders from the English class entered the room. The English teacher wanted her students to work on laptops as well, but she didn't have quite enough computers for the large class of seventh graders, so she sent in two boys to borrow laptops from my smaller class of eighth graders. But when they see the eighth graders playing with the lights, they decide to join in and start flicking the lights themselves.

I try to punish my class for playing the lights -- but they claimed that it was unfair to punish them since "only" the two seventh grade boys were guilty. I began to yell -- and this caused the history teacher to leave his classroom and find out what was going on. In the end, he ended up canceling the following week's party -- and since he was no longer having a party, there was no reason for me to hold the Kwanzaa Karamu either.

It's easy to see how this incident was a reflection of my classroom management. Even as a sub, I've never seen students enter the classroom at the beginning of the period play with the lights before. The students don't play with the lights until after they perceive me to be a weak, powerless teacher. So if students are playing with the light switch, it means that I've already lost control of the class.

And it's also easy to see what I did during IXL time that was weak. The most obvious punishment to give students during laptop time is to take away the laptops and forbid them from using them. But I had no back up assignment, and I knew that the students might see the cancellation of IXL as a reward rather than a punishment.

In previous posts, I've mentioned what I should have done with IXL that year -- have an IXL accountability worksheet. Students who have their laptops taken away would be required to copy and answer eleven questions on that worksheet. Since I didn't know which individuals were responsible for turning off the lights, the entire class would be subject to the punishment. I wouldn't have to yell, or even talk about the lights. If anyone asks why they can't use the laptops that day, I would give the stock answer "Because I said so." The first ten questions would be math, while the eleventh question would be, "Will I ever turn off the lights without permission?" with a one-word answer required. (If someone protests, "But I didn't turn off the lights!" I point out that the question begins with the word "Will," indicating the future tense, not the past tense.)

[2018 update: Or I could have simply had the students show their work on a blank piece of paper, just like one teacher I subbed for last month.]

Hopefully, if the two seventh graders enter to see the eighth graders working, they aren't inspired to turn off the lights themselves. But in case I don't stop the eighth graders before two younger boys arrive and they in turn play with the lights, I punish them the next day. This would not be a class punishment but individual, since it's obvious which two boys are involved in the incident. If I had done all of this, the history teacher would never have cancelled the party, and the Karamu could have proceeded as I intended. The day before the party -- Kuumba day -- would have been a good day to have the students show their creativity by doing an art project, perhaps drawing the seven candles (one black, three red, three green) that Kwanzaa celebrants light during the holiday.

By the way, as I mentioned in my Hidden Figures post (dated January 6th), the sixth and eighth grade classes were majority black, but the seventh grade class was mostly Latino. I was considering making up for this by having a Fiesta later in the year. Indeed, one day during a music break, a seventh grader wanted me to open one of my songs with "Uno, dos, tres, cuatro." I didn't that day, but I realized that there was a Square One TV song for which this opening would fit -- "X is the Sign of the Times," which also had Spanish lyrics -- "Equis es el simbolo de los tiempos." The planned date for this song was Cinco de Mayo -- but alas, by May 5th I was no longer in the classroom.

Ogilvy and Continued Fractions

This is the time of year that I post my annual Calendar Reform post. But I promised that I'd post the Ogilvy chapter that we skipped, since there's a relationship between this topic and calendars.

[2018 update: We finished reading Ogilvy's book last year, but this year I've decided to repeat his continued fraction chapter due to its relevance to calendars and Calendar Reform.]

Chapter 10 of Stanley Ogilvy's Excursions in Number Theory is "Continued Fractions." He begins:

"We now take a second look at the Euclidean algorithm which we presented in Chapter 3. On page 29 we confirmed by means of the algorithm that 14 and 45 are relatively prime: they have no common factor except 1."

Ogilvy now revisits the steps of that algorithm, except this time he divides it using fractions:

45/14 = 3 + 3/14
          = 3 + 1/(14/3)
          = 3 + 1/(4 + 2/3)
          = 3 + 1/(4 + 1/(3/2))
          = 3 + 1/(4 + 1/(1 + 1/2))

We stop when the last fraction has a numerator of one (which corresponds to a GCF of 1). The multiple-decker expression:

3 + 1/(4 + 1/(1 + 1/2))

is called a continued fraction expansion of the number 45/14.

Ogilvy explains how continued fractions can be used to approximate the original fraction. He deletes the last fraction 1/2:

3 + (4 + 1/1) = 16/5

This is an approximation of the original fraction 45/14, which we verify by subtracting:

45/14 - 16/5 = (45 * 5 - 14 * 16)/(14 * 5) = (225 - 224)/70 = 1/70

Since the error is only 1/70, the two fractions are very close. Ogilvy tries another example:

87/37 = 2 + 13/37
          = 2 + 1/(37/13)
          = 2 + 1/(2 + 11/13)
          = 2 + 1/(2 + 1/(13/11))
          = 2 + 1/(2 + 1/(1 + 2/11))
          = 2 + 1/(2 + 1/(1 + 1/(11/2)))
          = 2 + 1/(2 + 1/(1 + 1/(5 + 1/2)))

Once again, we discard the last fraction:

2 + 1/(2 + 1/(1 + 1/5)) = 40/17

and find the error:

87/37 - 40/17 = (87 * 17 - 37 * 40)/(37 * 17) = (1479 - 1480)/629 = -1/629

This time the difference is smaller and negative.

Ogilvy now writes about the purpose of these continued fractions. One purpose of them is to solve linear Diophantine equations:

45x - 14y = 1

To solve this equation, we take the equation from earlier:

(45 * 5 - 14 * 16)/(14 * 5) = 1/70

and multiply both sides by 70:

45 * 5 - 14 * 16 = 1

which produces (5, 16) as the solution of the Diophantine equation without trial-and-error at all. Here is Ogilvy's next example:

87x - 37y = 1

But this time, we repeat the process to obtain:

87 * 17 - 37 * 40 = -1

Oops -- we wanted +1, not -1. This time, we return to the continued fraction process and replace the last 1/2 by:

1/(1 + 1/1)

And now we can throw out the last 1/1 instead of 1/2:

2 + 1/(2 + 1/(1 + 1/(5 + 1/1))) = 47/20

Finding the difference as usual:

87/37 - 47/20 = (87 * 20 - 37 * 47)/20 = (1749 - 1739)/20 = 1/740

or

87 * 20 - 37 * 47 = 1

Thus the solution is (20, 47). Ogilvy now gives an admittedly trumped up problem related to these Diophantine equations:

"A man finds that he can spend all his money on widgets at 87 cents a piece, or he can buy gadgets at 37 cents a piece and have one cent left over. How much money does he have?"

87W = 37G + 1
87W - 37G = 1

And so W = 20, G = 47 is a solution. Here's how to find other solutions -- add 87 * 37 and then subtract it back:

87 * 20 + 87 * 37 - 37 * 47 - 87 * 37 = 1
87(20 + 37) - 37(47 + 87) = 1
87 * 57 - 37 * 134 = 1

And so another solution is (57, 134). In other words, the line whose equation is:

87x - 37y = 1

passes through the lattice points (20, 47), (57, 134), and others. Ogilvy writes that we can generalize this to solve:

ax - by = c

provided that the GCF of a and b -- say d -- divides c evenly.

At this point, Ogilvy writes about the main purpose of continued fractions. It's not to find fractions to approximate other fractions, but rather to find fractions to approximate irrational numbers.

His first example is sqrt(2). He begins by adding 1 -- that is, floor(sqrt(2)) -- and then subtract it back:

sqrt(2) = 1 + sqrt(2) - 1

We had good luck inverting before, so we try it again:

sqrt(2) = 1 + 1/(1/(sqrt(2) - 1))

Now we perform the Algebra II trick -- rationalize the last denominator by multiplying it and the numerator by its conjugate:

sqrt(2) = 1 + 1/((sqrt(2) + 1)/((sqrt(2) - 1)(sqrt(2) + 1)))
            = 1 + 1/((sqrt(2) + 1)/(2 - 1))
            = 1 + 1/(1 + sqrt(2))

At this point, we have that sqrt(2) equals something on the right hand side -- and that something itself contains a sqrt(2). So we substitute the entire RHS in for sqrt(2):

sqrt(2) = 1 + 1/(1 + (1 + 1/(1 + sqrt(2))))
            = 1 + 1/(2 + 1/(1 + sqrt(2)))

And the RHS still has a sqrt(2), so we substitute in RHS again and again ad infinitum:

sqrt(2) = 1 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + ...

Just as rational numbers have finite continued fraction expansions, it turns out that irrational numbers have infinite continued fraction expansions. At this point, Ogilvy points out that we don't know whether the infinite expansion converges at all, much less to sqrt(2). Here he decides to check the first few approximations, or convergents, to sqrt(2):

C_1 = 1
C_2 = 1 + 1/2 = 3/2
C_3 = 1 + 1/(2 + 1/2) = 7/5
C_4 = 1 + 1/(2 + 1/(2 + 1/2)) = 17/12

1/1, 3/2, 7/5, 17/12, ...

Ogilvy notices a pattern here -- to find the next denominator, add the old numerator and denominator, so for example, 17 + 12 = 29. To find the new numerator, add the new denominator and old numerator, so 12 + 29 = 41. So the next fraction is 41/29, and the pattern continues with 99/70.

Since these numbers should be approaching sqrt(2), their squares should approach 2:

1/1, 9/4, 49/25, 289/144, 1681/841, 9801/4900, ...

Let's find the errors -- their differences from 2:

-1/1, +1/4, -1/25, +1/144, -1/841, +1/4900, ...

Note that the signs alternate, the numerators are all 1's, and the denominators increase rapidly. This suggests that the sequence really does converge to sqrt(2). Ogilvy tells us that if the fractions in the sequence are y/x, then each one satisfies:

(y^2 +/- 1)/x^2 = 2

or

y^2 - 2x^2 = +/- 1

This is a famous Diophantine equation -- Pell's equation.

At this point Ogilvy returns to a problem from Chapter 2 of his book -- what perfect squares are also triangular numbers? The nth triangular number is (n^2 + n)/2, so we write:

(n^2 + n)/2 = m^2

Clearing the fraction, multiplying by 4, and adding 1 gives:

4n^2 + 4n + 1 = 8m^2 + 1
(2n + 1)^2 = 2(2m)^2 + 1

We let y = 2n +1 and x = 2m to obtain:

y^2 - 2x^2 = 1

which is Pell's equation. So each solution to Pell's equation also produces a square triangle -- the solutions to Pell are (2, 3), (12, 17), (70, 99). In each pair, half of the even number is the square and half of one less than the odd number is the triangle. Hence 1^2 is the first triangular number, 6^2 is the eighth triangular number, 35^2 is the 49th triangular number, and so on.

Ogilvy informs us that all irrationals of the form sqrt(a^2 + 1) can be developed the same way:

sqrt(a^2 + 1) = a + 1/(2a + 1/(2a + 1/(2a + ...

But other square roots, such as sqrt(3), are found using a different method that I choose not to include in this post:

sqrt(3) = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + ...

The successive convergents are:

1, 2, 5/3, 7/4, 19/11, 26/15, ...

whose squares are:

1, 4, 25/9, 49/16, 361/121, 676/225, ...

and whose errors are:

-2/1, +1/1, -2/9, +1/16, -2/121, +1/225, ...

This means that we now have solutions to the Diophantine equations:

y^2 - 3x^2 = 1
y^2 - 3x^2 = -2

The first of these is Pell's equation, but the second isn't, since the right hand side is -2, not -1. In fact, Ogilvy tells us that:

y^2 - Nx^2 = 1

has solutions for all N (except perfect squares, of course), but:

y^2 - Nx^2 = -1

has solutions for only certain values of N -- and 3 isn't one of them.

In the rest of this chapter, Ogilvy plays around with some continued fractions for a few special transcendental numbers. He gives us a result from Euler:

c_1 + c_1c_2 + c_1c_2c_3 + ... = c_1/(1 - c_2/(1 + c_2 - c_3/(1 + c_3 - ...

This isn't what's known as a simple continued fraction since the numerators aren't all 1, but this is a sort of generalized continued fraction. Most series aren't of the form given by the LHS, but it turns out that the Taylor series for arctangent is of this form:

arctan x = x - x^3/3 + x^5/5 - x^7/7 + ...
             = x + x(-x^2/3) + x(-x^2/3)(-3x^2/5) + ...
             = x/(1 + x^2/(3 - x^2 + 9x^2/(5 - 3x^2 + 25x^2/(7 - 5x^2 + ...

Ogilvy now substitutes in x = 1, since arctan 1 is 45 degrees or pi/4 radians:

pi/4 = 1/(1 + 1^2/(2 + 3^2/(2 + 5^2/(2 + ...

Even though pi has a simple continued fraction expansion, it follows no pattern. On the other hand, the simple continued fraction for e does show a pattern:

e = 1 + 1/1! + 1/2! + 1/3! + ...

e = 2 + 1/(1 + 1/(2 + 1/(1+ 1/(1 + 1/(4 + 1/(1 + 1/(1 + 1/(6 + 1/ + ...

According to Ogilvy, two computer programmers comment on why it's faster to calculate digits of e than digits of pi:

"One would hope for a theoretical approach... -- a theory of the 'depth' of numbers -- but no such theory now exists. One can guess that e is not as deep as pi, but try and prove it!"

Continued Fractions and Calendar Reform

OK, so now we have learned what continued fractions are. Earlier, I wrote that continued fractions have something to do with calendars, but it's not obvious what the relationship is.

[2018 update: I'm skipping a few sections of last year's post since I want to hurry up and get to the main topic, Calendar Reform.]

We know that the Gregorian Calendar -- the calendar currently in widespread use -- requires Leap Days in order to keep it accurate. Whenever we see a leap anything (Leap Second, Leap Day, Leap Week, and so on), it means that the ratio of two lengths of time (such as a year and a day) is not a whole number.

The following link gives the number of solar days in a tropical year:

https://mrob.com/pub/math/numbers-11.html

The value given there is 365.242189 days. So let's find a continued fraction for that number:

365.242189 = [365; 4, 7, 1, 3, 40, ...]

As it turns out, these numbers can be converted into the Leap Day rule for a calendar. Here's how we do this:


  • The Level-0 cycle is the length of the shorter unit. For example, when trying to determine the number of days in a year, one day is the Level-0 cycle.
  • For each value of n, the length of the Level-n cycle is given by the nth value a_n in the continued fraction (CF) found above. In particular, we combine exactly a_n Level-(n - 1) cycles with one Level-(n - 2) cycle.
So let's try this for the continued fraction found above:

0. The Level-0 cycle is one day.
1. The first value in the CF is 365. The Level-1 cycle consists of 365 Level-0 cycles, or 365 days in a year. This is a very basic approximation, used by the ancient Egyptians.
2. The second value in the CF is 4. The Level-2 cycle consists of 4 Level-1 cycles plus one Level-0 cycle, or four 365-days years plus a Leap Day. This is the Julian calendar cycle.
3. The third value in the CF is 7. The Level-3 cycle consists of 7 Level-2 cycles plus one Level-1 cycle, or 28 years (with 7 Leap Days) followed by a 365-day year (no Leap Day). In other words, once every 29 years, Leap Days would be five years apart rather than four.
4. The fourth value in the CF is 1. The Level-4 cycle consists of one Level-3 cycle plus one Level-1 cycle, or the 29-year cycle followed by a simple 4-year Julian cycle. In other words, once every 33 years (instead of 29), Leap Days would be five years apart rather than four.

This corresponds to an actual calendar -- the Dee Calendar. I've mentioned in past years that if our goal is to keep, say, the spring equinox on the same date, then it's better to have Leap Days mostly four and occasionally five years part, rather than go eight years between Leap Days as in the Gregorian Calendar (1896-1904 and 2096-2104, but not 1996-2004 because 400 divides 2000).


Whenever the number 1 appears in the continued fraction, we obtain two cycles of approximately the same length (such as 29 and 33 years). So we could call the 29-year cycle the short Dee cycle, and the 33-year cycle the long Dee cycle.

But in reality, John Dee (the 16th century British astronomer for whom the cycle is named) used only the 33-year cycle. This is because it's inaccurate to cut off the CF just before a 1 -- recall what Ogilvy wrote earlier. Cutting off the CF at 1 means throwing away the fraction 1/1, which is the largest fraction we can cut. It's better to cut off a fraction before any value other than 1. So Dee's calendar cuts off the CF just before a 3. Throwing away 1/3 is much more accurate than discarding 1/1.

By the way, there's also a calendar called the Dee-Cecil Calendar. The Dee and Dee-Cecil Calendars are exactly one day apart -- the difference is that the Dee Calendar seeks to keep the equinox on March 21st and the Dee-Cecil Calendar keeps it on March 20th instead. For most of my lifetime, the Gregorian and Dee-Cecil calendars coincided, and the equinox was always March 20th. For one recent year (March 2016-February 2017), the equinox on the Gregorian Calendar slipped to March 21st, and so the Gregorian Calendar agreed with the Dee Calendar instead of Dee-Cecil. Then the Dee and Dee-Cecil calendars observed February 29th, 2017, which aligned the Gregorian calendar with Dee-Cecil once again.


5. The fifth value in the CF is 3. The Level-5 cycle consists of 3 Level-4 cycles plus one Level-3 cycle, or three (long) Dee cycles followed by a short Dee cycle. Three 33-year cycles plus a 29-year cycle adds up to 128 years.

There are several calendars based on a 128-year cycle, but none of them actually observe Leap Days by combining Dee cycles this way. Instead, all of them simply observe Leap Days once every four years and then skip a Leap Day once every 128 years. This is similar to the Gregorian pattern, except that the skipped Leap Days follow a simpler pattern themselves (once every 128 years, instead of thrice every 400 years). Since 128 = 2^7, this cycle is often used in conjunction with binary, quaternary, octal, or hexadecimal bases. Let's call this cycle the Earth cycle, since it's used in, among other calendars, the Earth Calendar:


6. This sixth value in the CF is 40. The Level-6 cycle consists of 40 Level-5 cycles plus one Level-4 cycle, or 40 Earth cycles followed by one Dee cycle. No known calendar actually uses this cycle, which would span 5153 years. Just as it's inaccurate to cut off a CF before a 1, it's very accurate to cut off a CF before a large number like 40 (discarding 1/40 rather than 1/1).

Notice that none of these cycles corresponds to the Gregorian cycle of 400 years. We can force the Gregorian cycle to appear by finding a continued fraction for 365.2425 -- the average length of the Gregorian year -- instead of 365.242189:

365.2425 = [365; 4, 8, 12]

Here the Level-2 cycle is still the Julian cycle, but now Level-3 skips the short Dee cycle (which is incompatible with the Gregorian] and takes us directly to the long Dee cycle. Level-4 directs us to combine 12 Dee cycles (totaling 396 years) with one Julian cycle to complete the 400 years. This is actually used in a calendar, the Truncated Dee-Cecil Calendar (since the four-year cycle at the end "truncates" the pure Dee cycle):


Birthdays and Calendar Reform

I think back to my birthday on December 7th, which fell on a Friday this year. The teacher I subbed for gave the students a vocab quiz that day. But one student left almost all the words blank -- mainly because it was his birthday as well, and he didn't want to ruin our big day with a vocab quiz.

One feature of most Calendar Reform proposals is that they fix dates to a day of the week -- that is, they are perpetual. This means that holidays like Christmas can be fixed to a particular day of the week, such as Friday (to create a three-day weekend), and holidays like Thanksgiving can be fixed to a particular date in November.

But birthdays and wedding anniversaries cause a problem. We wouldn't mind if our birthday were always on a Saturday, but we'd hate it if it were always on a Monday. Perpetual calendars would fix birthdays to a particular day of the week, so someone would be stuck with a Monday birthday.

Actually, wedding anniversaries wouldn't be problematic, because they'd always fall on the same day as the original wedding. Thus if you and your spouse married on a Saturday, then you'd get to enjoy a Saturday anniversary every year. The real problem is with birthdays. This is especially true since a birth itself is work, therefore more births fall on weekdays (as in C-sections). But a birthday is a party, and the most desired dates for parties are weekends.

Weddings are essentially parties, which is why weddings and anniversaries aren't as much trouble on a perpetual calendar. A Google search reveals mixed information regarding which days of the week are the most popular for weddings. Here I assume that Saturday is the most popular and that Monday is the least popular, with the popularity increasing as we progress through the week. The tricky day to place is Sunday -- it's a weekend, but the next day is a weekday. Due to lack of information, let's place Sunday in the middle. So our list of most popular wedding days becomes:
  • Saturday
  • Friday
  • Thursday
  • Sunday
  • Wednesday
  • Tuesday
  • Monday
If people could choose the day of the week to celebrate the rest of their birthdays, this would likely be the order of popularity as well. On the other hand, births are more likely to fall during the week, since C-sections are scheduled for weekdays. For this I found the following link:

https://spacefem.com/pregnant/charts/duedate12.php

For "induced births," the sequence of days goes:
  • Thursday
  • Tuesday
  • Wednesday (tied)
  • Friday (tied)
  • Monday
  • Saturday
  • Sunday
And even for spontaneous births, Thursday was the most common day followed by Monday, with Saturday as the least common day. Thus on a perpetual calendar, the most popular day for birthday parties (presumably Saturday) would become the least common birthday, while Thursday -- though probably not the worst day of the week -- would become the most common birthday.

This is enough for some people to oppose Calendar Reform. If your birthday is on Thursday this year on the Gregorian Calendar, at least you know that a better birthday is coming up next year. But if your birthday is on a Thursday in the World Calendar, it's stuck on a Thursday forever.

I was born on December 7th, 1980, a Sunday, so if a perpetual calendar had been in force, my birthday would be on Sunday forever. I placed Sunday in the middle of the desirable birthday list -- at least I'd never have to take a test on my birthday, but I did blog about a final exam I once took on Monday, December 8th.

I alluded to a possible solution in past Calendar Reform posts. A compromise between the Gregorian Calendar (with seven possible days for your birthday) and a perpetual calendar (with just one possibility, good or bad) is to have two possible calendars. The idea is if your birthday is on a weekday one year, it will fall on the weekend the following year. The calendar is simpler in that there are always just two possibilities for the day of the week, but no one's birthday will ever be stuck on an undesirable weekday.

This idea doesn't work well with our seven-day week, nor does it work with a shorter week. This is because seven and all smaller natural numbers are factors of either 364, 365, or 366. This means we can divide the year into a whole number of weeks with perhaps one day left over (a blank day). For this idea, we instead want half-weeks that force birthdays to switch to the other half of the week.

This idea works best with weeks of 8, 9, 10, or 12 days. These numbers aren't factors of 365 (or a neighbor or 365), but instead divide 730 or a number close to 730. As the creator of the Eleven Calendar (a few years back), I'm upset that 11 isn't on the list -- but then again, 11 * 33 = 363, which means that 11 is closer to dividing 365 evenly than 730.

Let me explain how this would work for an eight-day week. I admit that I was inspired by the following link, which is the same idea for a ten-day week:

https://zapatopi.net/metrictime/week.html

For our eight-day week, we want there to be four weekdays and four weekend days. We see above that happiness -- along with the willingness to have a birthday party -- isn't just dependent on whether it's a weekday or the weekend, but how many days remain until we switch from weekday to weekend or vice versa. So for this eight-day week, we'll drop Monday (since the weekend is never four full days away) and add in "Superday" and "Superduperday" before Saturday (since the name "Saturday" means that only one weekend day, Sunday, is left):
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Superduperday
  • Superday
  • Saturday
  • Sunday
So the idea is that if your birthday falls on a weekday (Tuesday-Friday) this year, then it will fall on a weekend day (any day starting with "S") next year.

Now our closest multiple of eight to 730 is 728, which is 364 * 4. This means that we need as many blank days as a 364-day calendar like the World Calendar -- one every year plus Leap Day. If the first year starts on Tuesday, then it will end with four days (Tuesday-Friday) plus Blank Day. Then the following year begins on Superduperday -- and we will have indeed switched weekdays the first year with the weekend the second year. Anyone with a weekday birthday the first year will celebrate on the weekend the following year. (Notice that for the ten-day calendar, the only blank day needed is Leap Day, since our multiple of ten is 730 itself.)

Both our eight-day and ten-day calendars are set up so that the work week is only half the week, with the weekend the other half. I often refer to this as the "triday plan," referring to the first calendar I ever read with such a plan (the Liberalia Triday Calendar). Reducing the work week to half the week means that the whole year consists of only about 180 workdays -- the same as the school year.

On one hand, it might be nice to reduce the office year to the school year, which would reduce the need for babysitting. Every weekend is a four- or five-day weekend. On the other hand, it means that there can be no summer break, winter break, spring break, or any break longer than that same four- or five-day weekend.

Our third possibility is the nine-day week. This is a little different because not only is nine an odd number (so we can't have exact half-weeks), but the closest multiple to 730 is itself odd (729).

Actually, there are some calendars based on nine and 729. Notice that not only is 729 a multiple of nine, it's in fact a power of nine (729 = 9^3). An old calendar (STIME) was fully based on nine -- nine days in a week, nine weeks in a month, and nine months in a "year" (actually two years). A blank day is thus needed every two years, with an additional blank day every four years (Leap Day).

One possibility for the nine-day week is to have five weekdays and four weekend days. We'll label the weekdays Monday through Friday, and then keep Superduperday and Superday along with the two standard weekend days.

But with five weekdays, it's possible to have a birthday alternate between Monday one year and Friday the next, so that a birthday is never truly on the weekend. But then again, recall that Friday is the second most desirable birthday. If your birthday were on Monday this year, you wouldn't mind if it were on Friday next year. (On the Gregorian Calendar, if your birthday is on Monday this year, you'd have to wait four years before it finally falls on Saturday.)

There are 40 1/2 weeks per year on this calendar, but only 36 weeks are needed for the school year to be 180 days. Thus there is some wiggle room. We might take one week off each for winter, spring, and summer breaks, and the remaining days can be for holidays. Notice that the Monday/Friday birthday pattern works well for holidays, since these will always extend the four-day weekend into a five-day weekend. In particular, New Year's Day should always fall on Monday/Friday.

Here's a link to a calendar based on 729, except it's taken as 3^6 rather than 9^3:

http://calendars.wikia.com/wiki/Kalentris

Here the workweek here is six days, rather than five. This means that some people's birthdays never fall on the weekend (the first day in some years and the fifth day out of six in others). This calendar allows for a more Gregorian-like school year (since 6/9 as a fraction is closer to 5/7) with breaks and holidays, but doesn't solve the weekday birthday problem.

In the eight-, nine-, and ten-day calendars, if a mother schedules a C-section for a weekday, then the baby's first, third, fifth, seventh, and all odd birthdays will fall on the weekend, while all even birthdays will fall during the week. So a Jewish boy's thirteenth birthday (bar mitzvah) will fall on the weekend, as will a Latina girl's fifteenth birthday (quinceanera). Also, the ever-popular 21st birthday will fall on the weekend as well. On the other hand, your 30th, 40th, 50th, and 60th birthdays will all fall during the week, but those are the birthdays that no one likes to celebrate.

The last possibility is a twelve-day week. Since 12 is even, the workweek consists of six days followed by a six-day weekend. Six consecutive workdays are tough, but at least this is convenient for both A/B and A/B/C high school block schedules. It's also possible to follow my suggestion for the Eleven Calendar and have a midweek day off plus a five-day weekend. This means that birthdays on the first day of the week one year will fall on the last day of the workweek the following year (just like the Monday/Friday pattern for the nine-day week above).

But 12 is tricky, only because the closest multiple of 12 is 732, which is slightly more than 730. It means that instead of blank days, we'd have to skip a few days. We'll revisit how to implement this 12-day week without skipping any days.

Of course, no calendar can completely solve the problem of having a quiz on your birthday. After all, everyday is someone's birthday, including quiz day. Knowing that your birthday will be on Saturday next year won't make you work harder on your birthday quiz this year -- just ask my fellow December 7th birthday celebrant in the class I subbed for that day.

David's Lunar Calendar

There's one more Calendar Reform proposal that my birthday inspired me to think about. I wrote that it was my 38th birthday, or second Metonic birthday. This means that the phase of the moon was the same that day as it was on the day I was born -- and as it turns out, it was a new moon.

On most lunar calendars (Chinese, Jewish, Muslim), each month begins at a new moon. This means that in both 1980 and 2018, my birthday was near the first day of the month in those calendars.

This inspires me to create David's Lunar Calendar, a calendar based on the new moon that fell on my own birthday. In particular, this date should be the start of a new year (in both 1980 and 2018).

This means that this will actually be a lunisolar calendar. In a pure lunar calendar such as the Islamic Calendar (or the Yerm Calendar that I posted last year), the first day of the new year can fall in any season (winter, spring, summer, fall). But on the Hebrew Calendar, Rosh Hashanah is always in September or October, while Chinese New Year is always in January or February. Both of these calendars are lunisolar. So if I want my birthday to be New Year's Day in both 1980 and 2018, then I'm in essence stating that my calendar is lunisolar as well.

Continued fractions can be used to construct lunisolar calendars, but the calculation is a bit more complex that a pure solar or lunar calendar (like the Yerm Calendar). We must find continued fractions for both the number of days in a lunar month as well as the number of lunar months in a solar year. Last year, in discussing the Yerm Calendar, I provided the following continued fractions:

Days in a lunar month: 29.530588853 = [29; 1, 1, 7, 1, 2, 17]
Lunar months in a solar year: 12.36826637 = [12; 2, 1, 2, 1, 1, 17, 3]

It's typical to look at the number of lunar months in a solar year first, and then make sure that the number of days in a month is accurate later on. Here are the relevant cycles:

0. The Level-0 cycle is the basic unit, the lunar month.
1. The first value in the CF is 12. The Level-1 cycle consists of 12 Level-0 cycles, or 12 months in a lunar year. This approximation is used in the Islamic Calendar.
2. The second value in the CF is 2. The Level-2 cycle consists of 2 Level-1 cycles plus a Level-0 cycle, or two years with a Leap Month.
3. The third value in the CF is 1. The Level-3 cycle consists of one Level-2 cycle plus a Level-1 cycle, or three years with a Leap Month.
4. The fourth value in the CF is 2. The Level-4 cycle consists of 2 Level-3 cycles plus a Level-2 cycle, or eight years with three Leap Months. The mean year length is 12.375 months. This approximation is called an octaeteris.
5. The fifth value in the CF is 1. The Level-5 cycle consists of one octaeteris cycle plus a Level-3 cycle, or 11 years with four Leap Months. The mean year length is 12.3636... months.
6. The sixth value in the CF is 1. The Level-6 cycle consists of one Level-5 cycle plus an octaeteris cycle, or 19 years with seven Leap Months. The mean year length is 12.368421 months. This approximation is called the Metonic Cycle.
7. The seventh value in the CF is 17. The Level-7 cycle consists of 17 Metonic Cycles plus a Level-5 cycle, or 334 years with 123 Leap Months. The mean year length is 12.368263 months. This approximation is used in the New Roman Lunisolar Calendar.
8. The eighth value in the CF is 3. The Level-8 cycle consists of 3 New Roman Cycles plus a Metonic Cycle, or 1021 years with 376 Leap Months. It is not used in any calendar I'm aware of.

There's one more thing to look at here. Notice that if there was a new moon at my birth on December 7th, then there must have been a full moon two weeks later -- near the winter solstice. (In fact, the year I was born, the winter solstice was around 9 AM Pacific Time on December 21st and the full moon was around 10 AM.) This means that December 7th isn't just an arbitrary date for starting the New Year -- it's the new moon nearest the winter solstice. The following full moon thus is the first full moon after the solstice. So we can set up David's Lunar Calendar so that New Year's Day is always the new moon nearest the solstice. My birthday will be earliest a year on this calendar can begin, while the latest is about a month later, January 7th.

https://www.tapatalk.com/groups/dozensonline/my-lunisolar-calendar-t1952.html

The original poster of that thread, "Nirvana Supermind," is trying to create a new lunisolar calendar. The goal is for there to be twelve months alternating between 30 and 29 days, named after number bases from "Unary" to "Dozenal." The leap month of 30 days is called "Baker's Dozenal" (as in a "baker's dozen," 13). Years are to begin around the fall equinox.

So far, this calendar will end up being similar to the Hebrew Calendar, except that the Jewish leap month falls between the sixth and seventh months. But unfortunately, there are a few errors in the way this calendar is stated. Let's look at Nirvana's post a little more closely:

Here's a list of the months:
  1. Unary (Sep 22-Oct 22), lasts 30 days
  2. Binary (Oct 23-Nov 21), lasts 29 days
  3. Ternary (Nov 22-Dec 22), lasts 30 days
  4. Quaternary (Dec 23-Jan 20), lasts 29 days
So "Unary" is supposed to last 30 days, from September 22nd-October 22nd. But that period contains 31 days, not 30. Likewise, "Binary," lasts from October 23rd-November 21st, but that's 30 days, not 29, and "Ternary" is also one day to long. I suspect that Nirvana is counting the days exclusively -- that is, October 22nd is indeed 30 days after September 22nd, as stated. But the days should be counted inclusively -- if Unary is a month that contains both September 22nd and October 22nd, then Unary contains 31 days. This is the classic "fence post" error. (For some reason, Nirvana counts the days in "Quaternary" correctly, as December 23rd-January 20th really is 29 days.)

In fact, what Nirvana posts isn't actually a lunar calendar at all, since there's no indication that the dates the months begin (September 22nd, October 23rd, and so on) are new moons, full moons, or any other phase. Instead, it's a solar calendar, with months alternating between 31 and 30 days (except Quaternary with 29). Twelve months alternating between 30 and 29 days add up to 354 days, but with most months one day too long Nirvana's add up to 365 days. (It would have been 366 if it weren't for Quaternary.)

As written, Nirvana's calendar resembles the following calendar:

http://calendars.wikia.com/wiki/Luni-solar_Modified_Gregorian_Calendar

The author writes:

The Luni-solar Modified Gregorian Calendar is not necessarily an actual luni-solar calendar in that the months are not in sync with the moons cycles. But it does attempt to keep predictably out of sync by being out of sync only one day per month.

And that's because each month is one day too long to be lunar (30/31 instead of 29/30). The calendar expert Karl Palmen also once created a "One Day Before" calendar based on this same idea.

But this clearly isn't what Nirvana intended, since he mentioned a leap month in his post, Baker's Dozenal. (Or is it "she"? Nirvana never mentions a gender, so I don't know what pronoun to use. Since it ends in "a," Nirvana could be female. Let me just try to avoid using pronouns altogether.)

Other posters in the thread are trying to help Nirvana out. Because this is the Dozenal Forum, Paul Rapoport wants to see more multiples of 12 in the calendar (or at least six) and fewer primes like 7, 13, and 29. And Silvano mentions the Metonic cycle and links to another lunisolar calendar, the Gaian calendar:

https://www.peristanom.org/p/calendar.html

In my last post, I wrote that a lunisolar calendar needs to have more 30-day months than 29-day months. This is why leap months always have 30 days, but as it turns out, this still isn't enough 30-day months. The Gaia calendar fixes this by adding an extra day to four of the shorter months ever Metonic cycle. It turns out that this is too many days, so one such day is dropped every 57 years (three Metonic cycles). Then this is too few days, so one day is added back every 798 years (fourteen 57-year cycles).

There's one more modification needed for the Gaia calendar. It turns out that the Metonic cycle isn't completely accurate. I mentioned this back when trying to explain why "Thanksgivukkah" (that is, Hanukkah on Thanksgiving) wouldn't occur again for another 70,000 years. Notice that the Hebrew Calendar (where Hanukkah comes from) is based on a pure Metonic cycle.

The Gaia calendar drops one month every 6441 years (339 Metonic cycles). This is another way of saying that the Metonic cycle is one month off every 6441 years (so that if Hanukkah is usually in December now, then 6441 years from now it will fall almost always in January). It will take about 12 * 6441 (or over 70,000) years for Hanukkah to migrate all the way around the year and land on Thanksgiving again.

The 6441-year period reminds me of another lunar calendar -- the Meyer-Palmen Solilunar Calendar, with a 6840-year period:

http://calendars.wikia.com/wiki/Meyer-Palmen_Solilunar_Calendar

Here "Palmen" refers to calendar expert Karl Palmen, while "Meyer" refers to Peter Meyer, the actual creator of the calendar. Palmen just did some of the calculations -- for example, Palmen writes:

https://www.hermetic.ch/cal_stud/nlsc/mpslci.htm

The MPSLC has interesting properties in its arrangement of long and short years, not only because it's a YLM calendar but also because its complete cycle is one month short of 360 Metonic cycles.

So the MPSLC is equivalent to skipping a month every 360 Metonic cycles, while the Gaia calendar skips a month every 339 Metonic cycles. These are two ballpark estimates for how long it takes a pure Metonic calendar (such as the Hebrew calendar) to fall one month behind the seasons -- around 6000 years.

Notice that the complete cycle of the MPSLC is 6840 years, but the complete cycle of the Gaia calendar isn't 6441 years. That's because the 798-year cycle the extra day isn't compatible with the 6441-year cycle for the missing month (although both are multiples of 19, the Metonic cycle). We might consider dropping a month every eight 798-cycles instead, which works out to be 6384 years. If we were to extend the extra day cycle to 855 years (fifteen 57-year cycles) and then drop a month every eight 855-year cycles instead, then this calendar would become equivalent to the Meyer-Palmen calendar.

One more difference between Gaia and MPSLC is that the years with extra days are never the same as the ones with extra months. On the MPSLC, the extra day is always added to the extra month (Meton 31st).

This post is already getting long, and lunar calendars are complicated. So I'll save a full description of David's Lunar Calendar for a later post. Our goal will be to fulfill the desires of both Nirvana Supermind and Paul Rapoport -- an accurate lunisolar calendar in which there are as many multiples of 12 (or at least 6) as possible.

Continued Fractions and Leap Week Calendars

So far, the Level-0 cycle has always been a day -- the basic calendar unit. We can obtain Leap Week calendars simply by making the Level-0 unit the week rather than the day. All we have to do is divide our tropical year length by seven and feed it into the CF calculator:

52.17745557 = [52; 5, 1, 1, 1, 2, 1, 6, 2]

Since this CF has so many more 1's, our Leap Week calendars won't be quite as accurate as our Leap Day Calendars.

0. The Level-0 cycle is one week.
1. The first value in the CF is 52. The Level-1 cycle consists of 52 weeks in a year, or 364 days.
2. The second value in the CF is 5. The Level-2 cycle consists of 5 Level-1 cycles plus a Level-0 cycle, or a Leap Week every five years. This isn't very accurate (average year length=365.4 days).
3. The third value in the CF is 1. The Level-3 cycle consists of 1 Level-2 cycle plus a Level-1 cycle, or a Leap Week every six years. This isn't very accurate (average year length=365 1/6 days).
4. The fourth value in the CF is 1. The Level-4 cycle consists of 1 Level-3 cycle plus a Level-2 cycle, or two Leap Weeks every 11 years. This isn't accurate (average year length=365.2727 days).
5. The fifth value in the CF is 1. The Level-5 cycle consists of 1 Level-4 cycle plus a Level-3 cycle, or three Leap Weeks every 17 years. This is in the ballpark (average year length=365.2353 days).
5.5 Even though the next value in the CF is 2, let's try combining just 1 Level-5 cycle with a Level-4 cycle anyway. This gives us five Leap Weeks every 28 years (average year length=365.25 days). In other words, this is equivalent to the Julian calendar. It doesn't appear in the CF for a very good reason -- the Level-5 cycle is already more accurate than the Julian calendar (albeit too short, rather than too long like the Julian calendar).
6. The sixth value in the CF is 2. The Level-6 cycle consists of 2 Level-5 cycles plus a Level-4 cycle, or eight Leap Weeks every 45 years. This produces an average year length of 365.2444 days.
7. The seventh value in the CF is 1. The Level-7 cycle consists of 1 Level-6 cycle plus a Level-5 cycle, or 11 Leap Weeks every 62 years. This produces a average year length of 365.2419 days. This cycle is used in the Usher Calendar (mentioned in my Leap Day 2016 post). Usher originally used the shorter Level-5 cycle of 17 years -- and technically, Usher actually combined seven Level-5 cycles with one Level-2 cycle of five years to obtain a 124-year cycle, but this is shown to be equivalent to two Level-7 cycles of 62 years each.
8. The eighth value in the CF is 6. The Level-8 cycle consists of 6 Level-7 cycles plus a Level-6 cycle, or 74 Leap Weeks every 417 years. This produces an average year length of 365.2422 days, and it is used by Brij Vij (the inventor of the Earth Calendar) in one of his other calendars.
9, The ninth value in the CF is 2. This Level-9 cycle consists of 2 Level-8 cycles plus a Level-7 cycle, or 159 Leap Weeks every 896 years. This produces an average year length of 365 + 31/128 days and is thus equivalent to the 128-year cycle for Leap Days. It is used in the Bonavian Calendar:


Just like the Earth Calendar, the Bonavian Calendar doesn't actually follow the CF-suggested cycle (two 417-cycles plus a 62-cycle), but instead uses Level-5.5 Julian cycles and then drops the extra Leap Week at the end of the 896-cycle. And since we've already reached the accuracy of the Earth Calendar, there's no reason to consider Level-10 or beyond.

Once again, the Gregorian cycle has been skipped. We can force it to appear by dividing 365.2425 by 7 and then finding its CF:

52.1775 = [52; 5, 1, 1, 1, 2, 1, 2, 2]

The first seven levels agree with the CF above, but this time we changed Level-8:

8. The eighth value in the CF is now 2. The Level-8 cycle consists of 2 Level-7 cycles plus a Level-6 cycle, or 30 Leap Weeks every 169 years. This produces an average year length of 365.2426 days.
9. The ninth value in the CF is 2. The Level-9 cycle consists of 2 Level-8 cycles plus a Level-7 cycle, or 71 Leap Weeks every 400 years. This is now equivalent to the Gregorian cycle. This cycle is used in the Hermetic Leap Week Calendar:


Another calendar, the New Earth Calendar, has a Gregorian-like Leap Week Rule. Leap Weeks are held every five years (Level-2 cycle), except they are skipped every 40 years, and then they are added back every 400 years:


It's possible to make Leap Week Calendars for weeks that are six days, eight days, or any other length, simply by dividing 365.242189 or 365.2425 by six, eight, or whatever.

Calendar Reform and Kwanzaa

Since I already opened a can of worms by mentioning Kwanzaa, an interesting question is, what happens to this holiday under the various versions of Calendar Reform? Assuming that we define Kwanzaa as December 26th-January 1st, for example:
  • On the 13-Month International Fixed Calendar (with Sol as the extra month in the middle of the year), each month has 28 days, so Kwanzaa is shortened to four days. Usually, the blank days are at the end of December, so Kwanzaa would be either five or six days.
  • Two Leap Week calendars listed above (Bonavian and New Earth) give December 28 days, so that Kwanzaa would have only four days. But the Leap Week is added to the end of December, so the month would have 35 days, with 11 days of Kwanzaa, in such years.
  • On the other hand, Kwanzaa wouldn't change much under the World Calendar. December already has 30 days with a blank day on the 31st, so it would remain a seven-day festival.
Of course, Kwanzaa is significant to me in that I had a Kwanzaa celebrant in my class last year. But it also matters to all teachers since that is our winter break. Recall that in New York, the only nine days that are guaranteed are Christmas Eve, Christmas Day, and the seven days of Kwanzaa. Exactly one of December 23rd and January 2nd is a school day. (This year there is school on January 2nd, since December 23rd was a Saturday.)

Thus shortening Kwanzaa really means shortening winter break, especially in New York. Depending on how the calendar is set up, all 28-day months begin on the same day, either Sunday or Monday. In the former case, Christmas falls on a Wednesday. Even New Yorkers don't attend school on the 23rd if it's a Monday (to avoid a one-day week), and so the last day of school is the 20th. If January 1st is New Year's Day, then Monday the 2nd is a holiday, and so students return on the 3rd. This means that schools are closed for a week and a day (possibly two days, if there's a blank day). 

It's much worse if the months begin on Monday. Then the 23rd is a Tuesday, and students would have to attend school on the 22nd and 23rd -- and then they return on Tuesday, January 2nd! So schools aren't even closed for a full week as schools are open both Tuesdays. Well, actually there would be seven days off if there's a blank day, but even seven days is too short for a "winter break."

I also once saw a (not-so-serious) calendar proposal that reduced December to only 26 days. The author (who's probably neither African-American nor a teacher/student) figures that the days between Christmas and New Year's are wasted days, so we jump directly from Christmas to New Year's Eve. I point out that Kwanzaa is now reduced to four days, and New York winter break (depending on the day of the week) could be reduced to a mere four-day weekend. (Actually, this calendar might be made more appealing of we give the the first 11 months 31 days each and the rest to December. But then the last month would have only 24 days. Christmas Eve suddenly becomes New Year's Eve and Christmas itself disappears. Of course, December 25th could become the Leap Day. Those who are fed up with Christmas might not mind celebrating it only once every four-year Julian cycle!)

There are a few other calendars that change the dates of Christmas and Kwanzaa. For example, there is the Fixed Festivity Calendar:


There are actually two calendars listed there, a Leap Day and a Leap Week calendar. (Notice that the Leap Day version explicitly mentions both Kwanzaa and Hanukkah!) Apparently all holidays are reduced to one day of the week, a special "Holiday" that appears only in weeks where there's a holiday -- which is more than half the weeks! The implication is that Christmas, Kwanzaa, and Hanukkah are all on December 24th, with Kwanzaa losing six of its days and Hanukkah losing seven of its days. The Leap Week version squeezes all holidays into four weeks, one each season,

Another calendar similar to Fixed Festivity is International Liturgical Calendar:


This is another Leap Week Calendar that seeks to redefine Christmas and other church holidays, but keeping them close to their original times of the year. It's designed to fit with the Gregorian Calendar and is thus similar to the Usher Calendar and its treatment of Christian holidays.

Continued Fractions and Music

Continued fractions can be applied to music as well as the calendar. For example, the Bohlen Pierce site has a continued fractions page:


The goal here is to convert just ratios into EDO's (for octaves) and EDT's (for tritaves), and justify why Bohlen-Pierce is a 13-note scale.

Just ratios, of course, are rational numbers, but when converted to cents (or divisions of an octave or tritave) they become irrational numbers. Continued fractions are used to find an EDO or EDT that would approximate the just ratio.

The point being made here is that all six major consonant intervals based on the 3:5:7 chord (9/7, 7/5, 5/3, and their inversions) have 13 in the denominator of one of their convergents. Thus 13EDT is a great scale in which to approximate BP. On the other hand, if we do the same with the 4:5:6 major chord and octaves, 12EDO only approximates the perfect fourth and fifth well. Other EDO's with good fourths and fifths are 41EDO and 53EDO. Meanwhile, 19EDO estimates minor thirds the best, while 28EDO and 59EDO estimate major thirds the best. No single EDO plays all the consonant intervals well, while a single EDT sounds all of the BP consonances well. As the link points out, "Small wonder that this regime [the 12EDO "regime," that is] is under siege.

The following link at Dozens Online is doing the opposite:


Here we are taking the 12EDO scale and converting it to just intonation. The task is to convert each note into hertz (where A is 440 Hz, and each semitone has ratio 2^(1/12)) and then entering the number of hertz into a CF calculator. Even if we just use the Level-1 approximations, we are already finding just ratios for the 12EDO notes. For example, Bb is approximately 466 Hz, and so the interval from A to Bb is approximately 466/440 (= 233/220).

Now this is the second time today that I'm looking up something -- in this case, the application of continued fractions to music -- and I stumble upon something else. There is a link into this thread to a BASIC program written for another old computer, the Atari:


I've written before about the limitations of computer music based on Bridge 261. It's nice that we can play a just major scale, but we can only play one just major scale, based on green Bb. This is because the least common numerator of all the intervals of the just major scale is 180, and 180 * 2 is 360, which is already too big. Hence only one just major scale can be played.

Now according to this link, the Atari also has the same limitations -- but there is a special method to extend the range. In addition to 8-bit music, which is based on 2^8 = 256, there is apparently 16-bit music, based on 2^16 = 65536.

It's difficult to interpret the tables here. Apparently, even though there is a SOUND command, the values appear to be based on degrees, with no subtraction from a bridge needed. A side effect is that higher values correspond to lower notes, and vice versa.

Lowering a note an octave should double the degree, but the ratios between two notes an octave apart aren't exactly 2/1. So C#3 is listed under 8-bit as Degree 230, but C#4 is given as Degree 114 instead of the expected 115 (230/2). The 16-bit table has the same problem -- C#3 is Degree 6450, but C#4 is Degree 3422 instead of 3425, and so on. (Also, we notice that the 8-bit Degrees on the Atari are not the same as those on the Color Computer. On the Atari Middle C4 is Degree 121, but on the Color Computer we found Middle C to be Degree 162.)

But let's assume that these are approximations and that the degrees really are based on just intonation and exact ratios like 2/1. Then even though the link above was trying to convert 12EDO into degrees, consider what this implies for just intonation and other scales:

[2018 update: I delete the rest of this section from last year, since it refers to scales that I didn't play this year. Of course, on the Atari more complex EDL scales are also playable.]

Conclusion: "The Twelve Days of Christmath" (Vi Hart) and Carol of the Bells (Mannheim Steamroller)

This is still the 12 days of Christmas, which run from December 25th-January 5th and end only at Epiphany on January 6th. (Yes, the 12 days of Christmas overlap the seven days of Kwanzaa.) And so I feel justified in posting another version of "The Twelve Days of Christmas" today. And besides, Vi Hart didn't post her version until the tenth day of Christmas, January 3rd. (Notice that the two religious calendars from earlier, Fixed Festivity and International Liturgical, accommodate Epiphany as well.)

But in these holiday posts, I want to fix/correct the songs I sang in my class last year. Last December I didn't write any original songs -- everything was either a Square One TV song, or a parody of a known song (either "Row, Row, Row Your Boat" or a Christmas song).

I tried to play Vi Hart's "The Twelve Days of Christmath" in class. The song didn't go too well, because many of the concepts she sings about are high school level or above. I really should have created my own version of the song with middle school math topics:


Vi's first verse is "the multiplicative identity." Even though many middle school students don't know what a multiplicative identity, the concept itself is simple -- even second graders should know that one times anything is the number itself.

Of course, Vi changes the words on every verse. Let's keep it simple and make it more like the original song, where the songs repeat each verse.

THE 12 DAYS OF CHRISTMATH

1. On the first day of Christmas, my true love gave to me,
     The multiplicative identity. (same as Vi)

2. ...The only even prime,... (same as Vi)
3. ...The number of spatial dimensions... (same as Vi)
4. ...The number of sides of a square...
5. ...Give me a high-five! (not mathematical, but a nice mid-song pick-me-up)
6. ...The smallest perfect number...
7. ...The most common lucky number... (same as Vi)
8. ....The number of corners of a cube...
9. ...The number it all goes back to... (reference to Square One's Nine, Nine, Nine)
10. ...The base of Arabic numerals (same as Vi)
11. ...The number the amp goes up to... (same as Vi)
12. ...The number in a dozen...

Now let's program the Color Computer emulator. Because so many parts of the song repeat, let's just just use PLAY for this song. Actually, I notice that the Atari link above has lines like RESTORE 20140, which presumably means that only the DATA in line 20140 is restored. Hey, even the RESTORE command works better on the Atari. (I must find that Atari emulator!)

[2018 update: I'll keep this PLAY version here, even though I'd like to convert it to EDL. This is one of several songs that ranges from fifth-to-sixth -- that is, from C below the root note F to the D above that same F. This is best represented in EDL by using 15 to represent that green F. Then the low C becomes 20 and the high D becomes 9. A just major triad is playable on the green F as 15:12:10, which is superior to the triads played on either 18 or 20.]

10 FOR V=1 TO 4
20 PLAY "O2;L8;CC;L4;C;L8;FF;L4;F"
30 PLAY "L8;EFGAB-G;L2;A"
40 IF V=1 THEN 80
50 FOR X=V TO 2 STEP -1
60 PLAY "O3;L4;C;O2;L8;GA;L4;B-"
70 NEXT X 
80 PLAY "O3;L4;C;L8;D"
90 PLAY "O2;B-AF;L4;G;L2.;F"
100 NEXT V
110 FOR V=5 TO 12
120 PLAY "O2;L8;CC;L4;C;L8;FF;L4;F"
130 PLAY "L8;EFGAB-G;L2;A"
140 IF V=5 THEN 180
150 FOR X=V TO 6 STEP -1
160 PLAY "O3;L4;C;O2;L8;GAB-G"
170 NEXT X
180 PLAY "O3;L2;C;L4;D;O2;B;O3;L1;C"
190 PLAY "L8;C;O2;B-AG;L4;F"
200 PLAY "B-DF;L8;GFED;L4;C;L8;AB-"
210 PLAY "O3;L4;C;L8;D"
220 PLAY "O2;B-AF;L4;G;L2.;F"
230 NEXT V

Tonight I'm actually watching a Christmas performance by Mannheim Steamroller, which arrives here in Southern California three days after Christmas Day -- but of course, it's still the fourth day of Christmas.

Since I'm watching Mannheim Steamroller, let's try coding their (probably) most famous song, "Carol of the Bells," using SOUND and EDL. Here are a few things to know about this song:

  • Unlike most Christmas songs, this song is actually in a minor key. EDL scales work much better for minor scales than for major, and so we'll use 18EDL (like our Halloween songs).
  • The first 16 measures of this song are identical. In our fundamental key of D minor, these are the four notes (F-E-F-D).
  • And the next four bars are all (A-G-A-F). Instead of typing this all into DATA lines, I decide to use a FOR loop and a GOSUB subroutine. The first time we use this subroutine, the variable A has the value 15, and the four notes played are A, A+1, A, A+3 (15-16-15-18), which produces F-E-F-D. Then we execute the subroutine with A=12, which then makes the notes A-G-A-F (12-13-12-15).
  • DATA lines are used for the rest of the song. Even though a few lines repeat twice, it's too difficult to avoid repeating these lines.
NEW
10 N=7
20 A=15
30 FOR X=1 TO 16
40 GOSUB 400
50 NEXT X
60 A=12
70 FOR X=1 TO 4
80 GOSUB 400
90 NEXT X
100 FOR X=1 TO 39
110 READ A,T
120 SOUND 261-N*A,T
130 NEXT X
140 A=15
150 FOR X=1 TO 8
160 GOSUB 400
170 NEXT X
180 SOUND 261-N*12,4
190 SOUND 261-N*13,2
200 SOUND 261-N*12,2
210 SOUND 261-N*18,16
220 DATA 9,4,9,2,9,2,10,2,11,2
230 DATA 12,4,12,2,12,2,13,2,15,2
240 DATA 13,4,13,2,13,2,12,2,13,2
250 DATA 18,4,18,2,18,2,18,4
260 DATA 24,2,21,2,19,2,18,2,16,2
270 DATA 15,2,13,2,12,2,13,4,15,4

280 DATA 24,2,21,2,19,2,18,2,16,2
290 DATA 15,2,13,2,12,2,13,4,15,4
300 END
400 SOUND 261-N*A,4
410 SOUND 261-N*(A+1),2
420 SOUND 261-N*A,2
430 SOUND 261-N*(A+3),4
440 RETURN

Notice that this song is best described as "melodic minor," where the descending scale sounds different from the ascending scale. From the high D (DATA line 220), we descend D-C-Bb-A. (Here we use the 11, lavender B, to represent Bb.)

But from the low A (DATA line 220), we need to ascend A-B-C#-D. We start at 24 (white A), and then the next note is 21 (red B, which definitely sounds like B natural, unlike the lavender B at 11 or 22). The next note is 19 (19u C#), which serves as a leading tone to the white D. So this song uses 19 but not 17.

Like all EDO scales, there are more playable notes in lower than higher octaves. We can play lavender B and green C in the lower octave as 22 and 20, but we can't play red B and 19u C# in the higher octave.

The fundamental key (N=1) is D minor. Since this song uses 24, N can be at most 10. Here I choose N=7, which plays the song in the key of red E. Mannheim Steamroller plays this song in the key of E minor -- though the authentic version also modulates in other keys as well as plays a few tricky sequences that we don't attempt to code in Mocha.

I hope you enjoy the rest of your holidays, and the rest of your winter break. My next post is scheduled for not this weekend, but next weekend.

2 comments:

  1. Thank you so much for your crucial recommendations for the Gaian calendar! I've gratefully adopted the changes you suggested, and I hope you don't mind that I've credited this blog post. Your expertise was much needed!

    ReplyDelete
  2. I don't mind at all. Thanks and I'm glad I was able to contribute to your calendar!

    ReplyDelete