## Sunday, December 31, 2017

### New Year's Eve Post: The Yerm Calendar and New Yerm's Resolutions

1. The Pappas Book Ends -- The Borges Book Doesn't
2. Continued Fractions and Lunar Calendars
3. Continued Fractions and the Yerm Calendar
4. The Yerm Calendar and Blue Moons
5. The Yerm Calendar and Schools
6. The Yerm Calendar and Gubernatorial King Plan
7. Holidays on the Yerm Calendar
8. The Yerm Calendar and the QNTM List
9. Coding Square One TV's "Angle Dance"
10. Conclusion: New Year's (New Yerm's?) Resolutions

The Pappas Book Ends -- The Borges Book Doesn't

This is what Theoni Pappas writes on page 61 of her Magic of Mathematics:

"In the 1900's infinity was featured in Jorge Luis Borges' book The Book of Sand. Here the main character acquires a 'marvelous' book."

This is the last page of the section "Mathematical Worlds in Literature," which is the last section of Chapter 2, which is the last Pappas chapter that we're reading because today is the last day of 2017. I did say that our final Pappas post would be on December 31st, and voila!

"'The number of pages in this book is no more or less than infinite. I don't know why they're numbered in this arbitrary way.' This book adversely changes his life and his outlook on things, until he realizes he must find a way to dispose of it -- 'I thought of fire, but I feared that the burning of an infinite book might likewise prove infinite and suffocate the planet with smoke.' You might want to read the book to find out how the hero resolved his dilemma.

"For example, in an episode of Star Trek -- The Next Generation, the starship is being pulled by an 'invisible' force toward a black hole. Only when the ship's schematic monitor changes perspective does the crew realize the unknown force is a 2-dimensional world of minute life forms.

"Mathematics is full of ideas that make one's imagination churn and wonder -- Are they real? To mathematicians they are real. Mathematicians are familiar with the worlds in which these ideas reside -- perhaps not within our realm, but real in their own nonetheless!"

The Borges book may be infinite, but the Pappas book isn't. We have completed our reading of the Pappas book, which we began with Chapter 3 in March when I first bought the book, and then we finished today when we looped back to Chapter 2. Tomorrow I will return to The Mathematics Calendar 2018 by Theoni Pappas. Just as I did from 2014-2016, I'll only post questions from that calendar if they are related to Geometry, since that's the mathematical world we have always been explorers of on this blog.

Continued Fractions and Lunar Calendars

It's still Calendar Reform week, so let's return to the use of continued fractions in calendars. So far, we've only looked at solar calendars, so let's see what happens if we try to make a lunar calendar.

Lunisolar calendars use a lunar month as the Level-0 unit. The two major lunisolar calendars are the Chinese Calendar and the Hebrew Calendar. The following link provides us with the length of the lunar month:

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

The length of the mean synodic month is 29.530588853 days. Since we already have a value of the tropical year as 365.242189 days, we divide the month into the year and enter this value into one of the continued fraction calculators:

12.36826637 = [12; 2, 1, 2, 1, 1, 17, 3]

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, which is often characterized as a pure lunar calendar rather than lunisolar because it is so inaccurate. Because of this, Muslim holidays like Ramadan (and its conclusion, Eid al-Fitr) can fall in all four seasons during the course of a lifetime.
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:

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

The octateris was first used by the ancient Greeks. According to the link above, the octaeteris is about one or two days off after eight years, and so this calendar is comparable to a pure solar calendar with a simple approximation of 365 days -- this is also about two years off after eight years.

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:

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

The Metonic cycle is named for the Greek astronomer Meton, but it may have been discovered many centuries earlier. Many lunisolar calendars, including the Hebrew Calendar, use the Metonic Cycle. It is an excellent approximation because the next number in the CF is the large 17.

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:

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

Because of its use in this calendar, we can call the 334-year cycle the "New Roman Cycle."

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, and since the next value in the CF is the huge 26, there's no point in going any further. All the CF values used in actual calendars also appear in the following list:

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

But notice that even though these continued fractions tells us how many months are in a year, they don't tell us how many days there should be in each month. Recall that 29.530588853 days is the length of the lunar month.

The New Roman Lunisolar Calendar, for example, has ten months of exactly 30 days in length, even though this is slightly longer than the lunar month. (Because of symmetry, the two months near the middle of the year, Quintiliae and Sextiliae, do start near new moons, but not the other months.) The other two months, called Brumias, vary greatly in length. Then again, there's no claim that any month starts on the new moon except for New Year's Day, which is on the new moon if there's no Leap Month and the full moon if there is. Indeed, there is no Leap Month -- instead the Brumias are longer in 123 of the 334 years. (On the other hand, the Chinese and Hebrew Calendars actually do start their months on new moons.)

Continued Fractions and the Yerm Calendar

It is possible to enter 29.530588853 directly into the continued fraction calendar. This means that months can all start at the new moon. But the cycles that this CF produces won't necessarily line up with solar years at all, much less any of the longer cycles such as Metonic Cycle.

The calendar produced by the continued fraction representation of 29.530588853 is called the Yerm Lunar Calendar, and it was created by calendar expert Karl Palmen.

29.530588853 = [29; 1, 1, 7, 1, 2, 17]

0. The Level-0 cycle is the basic unit, the day. Actually, Palmen uses a "night" as the Level-0 cycle. I see the reasoning behind this -- this is a lunar calendar based on the moon, and the moon is the most visible at night. Nights on the Yerm Calendar run from noon to noon, just as days typically run from midnight to midnight.
1. The first value in the CF is 29. The Level-1 cycle consists of 29 Level-0 cycles, or 29 nights in a lunar month.
2. The second value in the CF is 1. The Level-2 cycle consists of one Level-1 cycle plus a Level-0 cycle, or 30 nights in a lunar month. (Apparently the New Roman Lunisolar Calendar uses Level-2 cycles for ten of its months.) Recall that whenever 1 appears in a CF, we can use the words "long" and "short" to describe them. Hence we have 29-night short months and 30-night long months.
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 one long month and one short month. Let's call this the Long-Short Month Cycle. (This Level-3 cycle is the basic format of the Hebrew Calendar, plus adjustments.)
4. The fourth value in the CF is 7. The Level-4 cycle consists of 7 Level-3 cycles plus a Level-2 cycle, or eight long months and seven short months. This is a brand new 15-month cycle that Palmen calls a "yerm." One yerm is longer than one solar year. The mean month length is 29.533... nights.
5. The fifth value in the CF is 1. The Level-5 cycle consists of one Level-4 cycle plus a Level-3 cycle, or nine long months and eight short months. Since we have a CF value of 1, the words "short" and "long" apply again. Thus we have 15-month short yerms and 17-month long yerms. The mean month length is 29.529412 nights.
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 two long yerms and one short yerm. Palmen calls this the "basic three-yerm cycle" and states its mean month length as 29.530612 nights.
7. The seventh value in the CF is 17. The Level-7 cycle consists of 17 Level-6 cycles plus a Level-5 cycle, or 17 basic three-yerm cycles and one long yerm. This is the full yerm cycle as used by Palmen, and the last one he considers, so we don't need to look at the eighth CF value at all. He states the mean month length as 29.5305882 nights -- more accurate than the Hebrew calendar.

According to Palmen, the current Level-7 cycle began at noon on November 11th, 1996 -- most likely the new moon closest to the day he created the calendar. Here is a link to the Yerm Calendar:

https://www.hermetic.ch/cal_stud/palmen/yerm1.htm

Yerms have nothing to do with solar years, since they have either 15 or 17 months. The first yerm started in November 1996, but the next yerm (the 17th) will start on January 17th, 2018. So not only do we have a new year coming up, but a new yerm as well. (Happy New Yerm!) And just as the Dee Calendar is the most accurate rule-based solar calendar (in keeping the spring equinox on a fixed date), the Yerm Calendar is the most accurate rule-based lunar calendar (in keeping the new moon on a fixed date). Of course, no rule-based calendar can ever be exact.

The Yerm Calendar and Blue Moons

A blue moon occurs when there are two full moons in a calendar month. The last blue moon was in July 2015, and I mentioned it in my posts that month.

Of course, there are no blue moons on the Yerm Calendar itself, in that every month starts on the new moon and contains exactly one full moon, around the 15th of the month. But we can use the Yerm Calendar to find full moons, and then we can determine the next Gregorian month that contains two of them.

According to the link above, the current month (the 17th and final month of the 16th yerm) began back on December 18th. This is the first night of the month, or the new moon, and so the full moon would be on the 15th, or 14 nights after the full moon. This works out to be January 1st -- in other words, tomorrow is a full moon.

Now the new yerm begins on January 17th, a new moon night. So we add 14 days to this to obtain the next full moon, January 31st.(On the Hebrew Calendar, this is Tu b'Shevat, the Jewish Arbor Day.)

And lo and behold -- January 1st and 31st are both full moon nights, and so we've already identified the next blue moon, January 31st. It's easy to see why blue moons exist in the Gregorian Calendar -- January has 31 days, which is longer than the 29.530588853 days that make up a lunar month. So if there's a full moon sufficiently early in the month (like the 1st or 2nd), then there could be a second full moon at the end of the month.

Even though we've already located the next blue moon on January 31st, let's find out the next full moon anyway. The second month of the yerm begins on February 16th. (This new moon corresponds to Chinese New Year). And so the next full moon night will be two weeks later, on March 2nd. (In the Chinese Calendar, this is the Lantern Festival.)

Hmmm, this seems strange -- there are full moons on January 31st and March 2nd, but no full moons in February at all. This is the opposite of a blue moon -- a month without a full moon at all. And again, we can see why -- blue moons occur in months that are longer than 29.530588853 days, and so there can be months without full moons in months that are shorter than 29.530588853 days. In the Gregorian calendar, only February is short enough to lack a full moon.

And let's, for laughs, calculate one more full moon. The third month of the yerm is on March 17th, St. Patrick's Day. Two weeks later is the new moon, which we calculate as March 31st. (On the Hebrew calendar, this is the first day of Passover. It's also the Paschal Full Moon in the Easter calculation -- as this is a Saturday, Easter Sunday will be on April Fool's Day!)

And so March has two full moons, on the 2nd and the 31st -- hence March 31st is a blue moon. So you might have thought that "once in a blue moon" is rare, and yet 2018 will have two blue moons just two months apart.

Of course, the short February is the explanation for this. If January has a blue moon, then it would be late enough in January that the full moons skip February altogether. The full moons just barely skip February though (since 28 is barely less than 29.530588853), and so the next full moon would be early in March -- early enough to allow for a second full moon that month.

How often do we expect blue moons to occur, anyway? We go back to lunisolar calendars and notice that if there is a Leap Month -- that is, 13 full moons in a solar year -- then since there are only 12 months on the Gregorian Calendar, one month must have two full moons. (This is the Pigeonhole Principle at work.) So we expect there to be as many blue moons as there are Leap Months:

3. Using the Level-3 cycle, there is one blue moon every three years.
4. Using the Level-4 cycle, there are three blue moons every eight years.
5. Using the Level-5 cycle, there are four blue moons every 11 years.
6. Using the Level-6 cycle, there are seven blue moons every 19 years (Metonic Cycle).

The Metonic Cycle is accurate enough for our purposes here. So there are seven blue moons every 19 years -- at least, there would be, if it wasn't for the short February problem.

Of the seven blue moon years, we expect one of them to be a January-March blue moon year. And indeed, the last such year (and the only other double blue moon in my lifetime) was in 1999, exactly one Metonic Cycle ago. (This can be confirmed using the Yerm Calendar for 1999, except that the first full moon is on January 2nd since it's a 29-day short month.) And so the final answer is that there are eight blue moons and one month without a full moon every 19 years.

http://earthsky.org/astronomy-essentials/lengths-of-lunar-months-in-2017

According to this link, the current lunar month (December 18th-January 17th) is in fact the longest lunar month of the century (29.804722 days), because the new moon is farthest from the earth. (The corresponding full moon is at its closest to the earth and is therefore a "supermoon.") It's interesting that the Yerm Calendar assigns 30 nights to the current month, since no rule-based calendar can predict this sort of variation in the lunar month length. (And the shortest lunation of the year is indeed assigned 29 nights on the Yerm Calendar.) In the Yerm Calendar, the months alternate 30 and 29 nights (Long-Short Month Cycle) with the first and last months of each yerm (15 or 17 months) having 30 nights -- so it has nothing to do with the actual variation of the lunation lengths.

It's interesting to see how blue moons work on other calendars. In the World Calendar, no month is shorter than 30 days, and so every month has a full moon. Blue moons occur about as often as predicted by the Metonic Cycle -- seven blue moons every 19 years.

On the International Fixed Calendar, every month is shorter than 29 days, and so no month has a blue moon (unless you count full moons on blank Leap Days as blue moons). With every month as short as February, months without full moons are more common. Since the Metonic Cycle has seven solar years with 13 full moons, it follows that there are 12 solar years with only 12 full moons. Hence months without a full moon occur 12 times every 19 years. (If we count December 1st-30th full moons as Leap Day blue moons, it's likely that neither November nor January has a full moon, but since not every year has a Leap Day, we expect this to be rarer than once per Metonic Cycle. We would have to go to the 334-year New Roman Cycle. My estimate is that Leap Day blue moons in the Int'l Fixed Calendar would occur once or twice in every New Roman Cycle.)

The Chinese Calendar also has a blue moon scenario -- except that this calendar counts new moons instead of full moons. As a lunisolar calendar, the Chinese Calendar has a lunar and a solar component -- the (mostly invisible) solar calendar divides the year into 12 solar terms (which line up with solstices, equinoxes, and astrological signs). Each lunar month is numbered for the solar term in which it begins, but if there's a "blue new moon" (a solar term with two new moons), the lunar month starting on the second new moon is officially the Leap Month. Hence Leap Months can occur at any time of the year (unlike the Hebrew Calendar, where they always occur near the Gregorian March).

As it turns out, the no-full-moon in February phenomenon can also occur in the Chinese Calendar. It happens that the solar terms aren't equal in length, but follow the elliptical orbit of the earth. (See my November 29th post for more info on the earth's orbit.) The shortest solar term is shorter than one lunar month (just as Gregorian February is), and so it could lack a new moon, with two new moons in each of the surrounding months. Unfortunately, the shorter solar terms (as we found out on November 29th) occur close to perihelion in January -- hence close to Chinese New Year. This results in a complication in the rule for Chinese New Year, when the New Year begins on the third new moon after winter solstice (instead of the usual second).

The Yerm Calendar and Schools

This is an education blog, and so I often like looking at the school year on various calendars. So let's see what would happen if we change the school year so that it fits the Yerm Calendar.

First of all, Karl Palmen describes a lunar week that fits with his Yerm Calendar:

The days of the month can be numbered from 1 to 29 or 30 as is conventional in most calendars. But I have in the first few months after inventing the calendar, used a lunar week whose weekends occur around the principal phases of the moon.
The 1st, 8th, 15th, 22nd and 29th 'nights' of the month are called 'Moonnight'. The first four of these form the start of a lunar week, whose 'nights' are
Moonnight, Tuesnight, Wensnight, Thursnight, Frinight, Saturnight and Soonnight (soon to be Moonnight).
For example, the 10th 'night' is referred to as the Second Wensnight.
This fixes the lunar week in relation to the standard 7 day week for the first four weeks of the month.
The 30th 'night' is a Soonnight, but the last night of any month can be referred to just as 'Lastnight' rather than 'Fifth Soonnight' or 'Fifth Moonnight'.
Short dates are ym(mm(w(d. So for example Fourth Frinight Month 2 Yerm 3 is 03(02(4(5.
I've also considered making the second lunar week have 8 days, but haven't decided how to name the 'nights'.

The name "Moonnight" refers to the phase of the moon -- new moons, first quarters, full moons, and third quarters are all supposed to fall on or near "Moonnight." But the similarity between the names "Moonnight" and "Monday" -- likewise "Tuesnight" and "Tuesday," and so on -- hints that the school week should last from Moonnight to Frinight, with Saturnight and Soonnight the weekend.

But there's a problem here -- the "nights" change at noon! This is convenient for observing the moon at night, but not for learning, since noon is in the middle of the school day.

I think the best plan is for the first school day to be when Moonnight changes to Tuesnight, and then the fifth school day is when Frinight changes to Saturnight. This has several advantages over the alternative of making Soonnight to Moonnight a school day:

• Just as New Year's Day is a holiday, presumably New Yerm's Day is a holiday. (Since all nights start at noon, so do yerms, and so "5, 4, 3, 2, 1, Happy New Yerm!" counts down to noon.) So the big party is at noon when Soonnight changes to Moonnight, and then the first school day of the yerm is the next day, as Moonnight becomes Tuesnight.
• Palmen writes, "...weekends occur around the principal phases of the moon." So Moonnight, when the principal phase of the moon occurs, is still part of the weekend. The school week begins with the moon longer visible -- the morning when Moonnight becomes Tuesnight.
• Palmen tells us that the 29th is always a Moonnight, so in short months, there are two Moonnights in a row. The 30th is always a Soonnight, and so in long months, the nights go Soonnight, Moonnight, Soonnight, Moonnight. It's convenient to have a three- or four-day weekend at the end of each month -- and this is justified because the school week doesn't begin until Moonnight changes to Tuesnight.
It may be convenient to push all holidays to the end of the month, so that we have four full five-day weeks of school (or 20 days) per month, with a three- or four-day weekend at the end. This means that there is no "Big March" or long stretch without at least an extended weekend. (The Leap Week version of the Fixed Festivity Calendar pushes all holidays to a single week in each season. We might prefer having a full week off rather than just a three- or four- day weekend -- but the flip side is that we must go three straight months without a holiday before the week off. That's not a "Big March" -- that's a "Giant March"!)

OK, so now we've determined the school week, but what about the school year (yerm)? A yerm is much longer than a year -- yerms have either 15 or 17 months. We might enjoy having a standard nine months of school followed by six or eight months of vacation -- but then it will take 13 yerms (about 17 years) to finish grades K-12 rather than 13 years. High school grads would be old as college grads now are on the Gregorian Calendar!

So let's try something else. Palmen provides us with a rule of thumb here:

The construction of this table was greatly aided by the fact that 3 yerms is exactly 2 weeks less than 4 Julian years, except when the 3 yerms begin with the last yerm of a cycle.

So three yerms are approximately equal to four years -- that is, a yerm is about 1 1/3 years. So we figure that just as a year has 180 school days, a yerm should have a third again as many days -- that is, 240 school days. Each month has 20 school days, so there are 12 months in a school yerm. The remaining three or five months will be vacation months.

In the 15-month short yerm, let's try declaring months 5, 10, and 15 to be vacation months. We don't attempt to have a three-month "summer vacation" because there is no "summer" on the non-solar Yerm Calendar. With vacation months 5, 10, and 15, the 240-day school yerm has been divided into three 80-day terms.

What should we name these three terms? Since each is a third of a school yerm, we might refer to each as a "trimester," with progress reports given midway through the term, at the "hexter." But the name "trimester" may be a misnomer here, since it means three months, not "one-third year," since the root "mes" is Latin/Spanish for "month." (It's just a coincidence that one-third of the Gregorian school year really is about three months.) Our "trimesters" on the Yerm Calendar contain four months of school, so perhaps some form of "quad-mester" would be better. (Likewise, it's uncertain whether the "hex-" in hexter means one-sixth of a year or six weeks, because, once again, one-sixth of a Gregorian school year really is about six weeks.)

Maybe the best name for each term is "semester." (This is a misnomer whether or not you believe "semester" means six months or a "semi-year," since our semesters are neither six months nor half of a yerm.) This reflects the fact that our semesters contain 80 school days, which is not far from the nominal length of a Gregorian semester as 90 school days. (The first semester of the blog calendar contained only 83 days, and the LAUSD first semester is exactly 80 days.)

Each term would end with a final exam (for high school). Midway through each term ("hexter," or perhaps "quarter" since it's half of a semester) could be a midterm test. Actually, I'm considering making months 1, 6, and 11 the vacation months because then two of the three semesters have a long four-day weekend at the halfway point, rather than a three-day weekend.

By the way, what happens in 17-month short yerms? It's illogical to make months that don't appear in every yerm part of the school yerm (just as blank days in other versions of Calendar Reform are almost always holidays). And so months 16 and 17 can join with either month 15 or month 1 to form a three-month vacation, similar in length to the original summer vacation (though, once again, this can occur in any season).

All that's left is to determine how many yerms students must attend school for. According to Palmer's rule of thumb, four years are equivalent to three yerms. So let's convert Grades 1-4 to Yerms 1-3, Grades 5-8 to Yerms 4-6, and high school Grades 9-12 to Yerms 7-9. (The nominal four years it takes to earn a bachelor's degree also fits this pattern -- it's a three-term degree.) We might create new school standards using this pattern -- so Yerm 1 Standards consist of all Common Core 1 standards plus one-third of the Common Core 2 standards, then Yerm 2 is the rest of Common Core 2 plus about two-thirds of Common Core 3, then Yerm 3 is the rest of Common Core 3 plus all of the Common Core 4 standards, and so on.

As for high school math -- the focus of this blog -- the four years Algebra I, Geometry, Algebra II, and Precalculus must be converted into three yerms. Some high schools, in an attempt to get students to Calculus by senior year, compress four years of math into three years. These courses can be the basis of new high school courses -- which are no longer compressed, since now students have three yerms to complete them rather than three years.

Kindergarten doesn't quite fit into this pattern. But it's possible to combine California's "Transitional Kindergarten" with true kindergarten to form a Yerm 0.

The Yerm Calendar and the Gubernatorial King Plan

So far, all we've done is naively convert school years to school yerms. But why should we keep the same old education system? We should take advantage of the Yerm Calendar to make the education system into something better.

It's possible, for example, to make Classical Education fit yerms, since the four-year classical cycle fits the three-yerm cycle like a glove. Of course, there will now be only three divisions in each cycle rather than four (for example, ancient, medieval, modern history).

In the Gregorian Calendar, the school year starts in August or September, but the calendar year begins in January. I find this a bit annoying -- for example, when it's time to file for taxes and I've held different teaching jobs that follow the school years rather than the calendar year. And so in the Yerm Calendar, let's align the calendar and school yerms since they don't follow the seasons anyway.

Since three yerms are just about four years, students can enter Yerm 0 when they have reached the age of three yerms by the start of that yerm. But this means that a student who turns three on the second day of the yerm must wait an entire yerm before starting Yerm 0. So some students start Yerm 0 at the equivalent age of four years, while others must wait until they're almost 5 1/2 years old.

Instead, perhaps students may be allowed to start at the second or third "semesters" of the yerm. We should take advantage of the Yerm Calendar by allowing students to start at different times during the school yerm.

The Yerm Calendar is also a great fit for the Gubernatorial King Plan. Recall that two years ago, I suggested a radical school plan. (I never gave this plan a name, but here "Gubernatorial" refers to recommendations made by the California governor that are indirectly related to this plan, while "King" refers to the date I originally posted the plan, Martin Luther King Day.)

For example, let's divide the K-12 span into ten levels. Ten makes sense -- after all, I pointed out how each level can be subdivided into ten units. Then each student can receive a three-digit score -- the first digit gives the level from Level 0 to Level 9. The second digit tells which unit a student is on, and the third digit tells where within each level a student is approximately.

So these Levels 0 through 9 don't readily correspond to grades. I have no problem assigning the top four levels, Levels 6 through 9, to the traditional high school disciplines of Algebra I, Geometry, Algebra II, and Pre-Calculus, especially since these themselves don't correspond exactly to high school years. I still like the idea of having this testing plan max out at Pre-Calc, since there's already a separate test for Calculus students to take -- the AP exam.

This means that Levels 0 through 5 will take us approximately from grades K-8. With six levels to take us through elementary and middle school math, it's not as obvious which level, say, a fourth grader should be placed -- and this is the intent.

Of course, when I am creating the standards, I need to know how to convert from grade to level -- even though the schools shouldn't know this. Let's figure it out -- we need six levels to take us through the nine years K-8, so each level is approximately three semesters.

Returning to the present, I see a clear correspondence between my "levels" and yerms (even though the correspondence isn't exact), with about three semesters in each level/yerm. The main idea is that just as students can start Yerm 0 at different times through the yerm, they can progress through the other yerms at their own pace, too.

At the end of each semester, a computer-based standardized test can take place. I wrote that the computer can return a three-digit score -- the first digit for the level/yerm, and the other two digits for the score at a particular yerm level. I wrote this old post before I became familiar with IXL software, but we can plainly see that the IXL scoring system fits well here. A score of 100 indicates mastery -- that the student is ready for the next yerm. The normative time to complete a yerm is three semesters, so gifted students might need only two semesters and special ed students might need four.

Even though yerms aren't supposed to correspond to grade levels, we might at least wish to divide the yerms into elementary, middle, and high school spans. Two years ago I used Levels 3-5 for middle school, but using today's yerms it might be better to use Yerms 4-6 for middle school. Even now, Yerm 4 starts with fifth grade standards, which we might still wish to include with middle school.

I wrote that old post before my job at the charter school began. It's interesting to think about what my time would have looked like if our school used yerms instead of years. And yes, I know what you're thinking -- I didn't even finish the whole year at my school, so how could I have lasted a yerm? But perhaps my time there would have been better if the schools used yerms instead of years.

The first night of the yerm was September 2nd, 2016 -- not that long, of course, after the start of the real school year. Of course, if as I suggested Month 1 of a yerm is a vacation month, then the school year would actually begin on October 2nd. (Rosh Hashanah is a new moon holiday that fell close to that date last year.)

Since our charter school is so small, it seems doubtful that our school would have allowed students to start the yerm at different semesters. (That's one problem with any plan like this -- it presumes that the school is large enough to accommodate different tracks.)

Now let's assume that middle school consists only of Yerms 5-6 (with Yerms 0-4 at the elementary school on our campus and Yerms 7-9 at a high school somewhere else). Then with only two cohorts, this would have been similar to the situation at our sister campus -- two cohorts and two teachers, with one assigned to teach English/history and the other (me) to teach math and science, with time explicitly allotted on the schedule for both subjects. Then I obviously would have taught science better than I did on the original calendar, since there is time reserved for science on the schedule, plus only four preps to teach instead of six (counting science).

Of course, the class sizes would have been larger as three cohorts are condensed to two. Perhaps the class sizes would have been large enough to justify hiring a third teacher and then having the third cohort be, say, Yerm 5 starting from the second or third semester. Three cohorts (say Yerm 5 Semester 1, Yerm 5 Semester 3, and Yerm 6 Semester 2) probably wouldn't have looked that much different from the situation on the original calendar.

If we assume that Yerm 4 is also middle school, then the fifth grade class (and fifth grade teacher) are suddenly included in the middle school. That class is large enough that most likely there would have been four cohorts in middle school (Yerms 4-6 starting at different semesters), with four teachers. So the fourth teacher could have been science, and then I wouldn't have had to teach science myself!

It's difficult to tell whether I would have fared better under the Yerm Calendar or not. (For example, if one of the cohorts is in Semester 3 and is ready to take a computerized test which they must pass to get to the next yerm, I'd need better classroom management to make sure that they're ready for the test, or else everyone might fail it!)

But anyway, some readers might like this idea so much that they might wish to implement yerms at the school level, even if the rest of society keeps the Gregorian Calendar. If we assume that elementary (excluding kindergarten) is Yerms 1-3, middle school Yerms 4-6, and high school Yerms 7-9, then each span would have only eight semesters, instead of nine on the pure Yerm Calendar. So this would have to be considered when setting up standards and tests, since we want the average student to progress three yerms every eight semesters. (Or perhaps trimesters work better here, since each span would now be twelve trimesters, or four trimesters per yerm.)

Holidays on the Yerm Calendar

Palmen never defines any holidays on his Yerm Calendar. We presume that the extra days at the end of each month (the 29th and 30th) are used to set up three- and four-day weekends, so holidays can be placed near the ends of months.

One idea I favor is -- since there are 15 or 17 months per yerm rather than 12 -- we take advantage of the extra months by placing holidays from different cultures on the calendar. Some holidays are already associated with the new moon, such as Chinese New Year, Hanukkah,and Diwali (India), so these readily fit on the long weekends anyway.

But many popular holidays -- the aforementioned Tu b'Shevat, Lantern Festival, and Easter -- are associated with full moons, not new moons. Yet the calendar is set up only for new moon holidays.

Earlier in this post, I quoted Palmen:

I've also considered making the second lunar week have 8 days, but haven't decided how to name the 'nights'.

This results in eliminating four-day weekends, but replaces them with more three-day weekends -- including full moon weekends. This allows us to place holidays at the full moons. Under this plan every month has a long full moon weekend, but only 30-day months (the odd months) would have long new moon weekends. Keep in mind that yerms have nothing to do with seasons, and so it should be moon phases that determine the placement of holidays, not seasons.

We might assume that we are converting to the yerm calendar in 2018, and so we choose months that match the 2018 calendar. (After 2018, of course, the holidays won't match up any more.)

So let's dive in. As a first attempt, we place Tu b'Shevat at the first full moon, and then Chinese New Year at the first new moon, since this matches 2018:

Tu b'Shevat (01(15
Lunar New Year (02(01
Lantern Festival (02(15

But this is awkward -- a "New Year" festival at the second month of a yerm. Let's break from 2018 and place it at the start of the yerm:

Lunar New Yerm (01(01
Lantern Festival (01(15

Of course, you might ask, why is Chinese New Year granted the privilege of being allowed to start the yerm, rather than the Rosh Hashanah or the new year on any other calendar? Easy -- it's because their new year just happened to fall the nearest to the start of the 2018 yerm. And besides -- the current phrase "Lunar New Year" is automatically assumed to refer to the East Asian year.

How about this -- let's balance the calendar by placing a Jewish full moon holiday, Purim, at the next full moon:

Lunar New Yerm (01(01
Lantern Festival (01(15
????? (02(01
Purim (02(15

A new moon holiday is needed at the start of Month 2 (since Month 1 has 30 days), but not Month 3 (since Month 2 has only 29 days). In other words, new moon holidays are needed at the end of odd months, hence at the start of even months. (And of course, Month 1 starts with a holiday since all yerms end with an odd 30-day month.)

This year the full moon of Month 3 lines up with Easter, so let's add it in. This means that the new moon at the start of Month 2 should be like Carnival. This holiday usually occurs about a month and a half before Easter (hence near a new moon) and so it makes Lent the correct length:

Lunar New Yerm (01(01
Lantern Festival (01(15
Carnival (02(01
Purim (02(15
Easter (03(15

I haven't completely decided yet how I'd like to do the rest of the yerm. Since the months of no school are Months 1, 6, and 11, it might better to put Easter on (06(15, so that the month off fits the old Easter vacation. Then again, maybe we should put Christmas (a non-lunar holiday) on (06(15 instead, so that it fits the old pattern of Christmas as the first long break and Easter as the second long break of the year.

At any rate, holidays that are longer than one day might belong in vacation months. I already did this by placing Chinese New Year in Month 1 (as it's considered to be 15 days of continuous celebration lasting all the way to Lantern Festival). Multi-day Jewish holidays such as Hanukkah, Passover, and Sukkot might belong in the vacation months. I'd like to add at list one Muslim holiday -- perhaps the Ramadan fast with its culmination in the Eid al-Fitr feast

Also, we must decide whether holidays such as Passover and Easter should continue to line up. Of course, they correspond for historical reasons (in the Bible, the Last Supper was a Passover seder), but with extra months, we might wish to separate them so we can celebrate them both. We also have tough decisions regarding Christmas, Hanukkah, and Kwanzaa, as well as with Purim and Holi (India) if we wish to include them both.

Months 16 and 17 should be devoid of holidays, unless there are holidays that we wish to celebrate in long yerms and skipped in short yerms.

The Yerm Calendar and the QNTM List

By the way, who remembers the infamous QNTM list that seeks to imply that all Calendar Reform is bad and that we should just keep the Gregorian Calendar?

Let's see which boxes are checked by the Yerm Calendar -- a very radical change that would require many boxes to be checked. The most obvious box is:

`(x) solar years are real and the calendar year needs to sync with them`

since there are no solar years in the Yerm Calendar. As it's a lunar calendar, some of the lunar boxes should be checked, such as:

`(x) the lunar month cannot be evenly divided into solar days`

On the other hand, I don't check the following box:

`( ) having months of different lengths is irritating`

since the months of the yerm vary less than the Gregorian months. (The idea, remember, is to show why any proposed calendar is worse than the Gregorian calendar.)

I'd check the following box:

`(x) your name for the thirteenth month is questionable`

To me, this box is for any calendar with 13 or more months, even if the months aren't actually named.

For the repetition of Moonnight and Soonnight in certain weeks, this might be captured by:

`( ) every civilisation in the world is settled on a seven-day week`

although I prefer this box for calendars that eliminate seven-day weeks completely. Still, the repetition of these two days should be represented somehow. (Maybe the "lunar month can't be evenly divided into seven-day weeks" is better, but I reserve this box for Leap Week Calendars.)

Yerms and their nights begin and end at noon. We have the perfect box for that:

`(x) the day of the week shouldn't change in the middle of the solar day`

The Yerm Calendar starts in November 1996, so we would have:

`(x) nobody is about to renumber every event in history`

And of course, all proposed calendars require the following auto-checked box:

```(x) the history of calendar reform is insanely complicated and no amount of
further calendar reform can make it simpler```

Here are a few miscellaneous calendar comments. This year, Thanksgiving fell on Thursday, November 23rd -- which was not the last Thursday of the month of November. Both 2017 and 2018 are "Franksgiving" years -- those in which Thanksgiving is observed according to FDR's rules, not the ones first proposed by Lincoln.

On the other hand, Advent (the Christian countdown to Christmas) began on its latest possible date, Sunday, December 3rd, with the fourth Sunday of Advent not until Christmas Eve. One thing interesting about Lincoln's original Thanksgiving date is that it was always three days before the first Sunday of Advent -- thereby linking the Christian countdown to Christmas with the secular countdown to the holidays. I once read someone suggest that if retailers wanted to start holiday sales earlier, FDR should have just declared Black Friday to be a week earlier (the Friday before Turkey Day) and left Thanksgiving alone. The problem, of course, is that presidents give Thanksgiving Proclamations, not Black Friday proclamations.

This year in New York, the last day before winter break was Friday, December 22nd, and the first day back for students is Tuesday, January 2nd. New York schools close for Chinese New Year on February 16th, which extends right into the President's Day week break. Meanwhile, spring break in New York lines up with Passover, which starts on Saturday, March 31st and extends into the entire week after Easter -- but Good Friday, March 30th, is always a day off. Thus all three major breaks (winter, February, spring) are the same length in the Big Apple -- a week plus an extra day.

https://www.huffingtonpost.com/entry/double-newyear-supermoon_us_5a481a15e4b0b0e5a7a7011c?ncid=inblnkushpmg00000009

Notice that even though tomorrow's full moon is the supermoon, the preceding (December 3rd) and following (January 31st) full moons are often large enough to be considered supermoons as well. In addition, this is an eclipse season (having been about six months since the solar eclipse), and indeed the January 31st full moon is associated with a lunar eclipse that is visible in certain locations -- possibly including California.

Therefore January 31st is a supermoon, a blue moon, and a blood moon.

One commenter at the following link threw a wet blanket on the upcoming blue moon:

Dave Ralph:
There is no such thing as a "blue moon". It is a made-up term aimed to deceive the public. It merely means that there is a full moon on the first calendar day of the month. It has no scientific or observational significance whatsoever.

Strictly speaking, Ralph is correct -- "blue moons" are an artifact of the Gregorian calendar. On other calendars, January 31st won't be a blue moon:

• On the Yerm Calendar and most lunar calendars, there are no blue moons because every month, by definition, has exactly one full moon.
• On the New Reform Calendar, months go 30-30-31, and so the full moon date shifts to February 1st, hence it's no longer a blue moon. March, meanwhile, keeps its blue moon
• On the Symmetry010 Calendar, months go 30-31-30, and so not only does the full moon shift to February 1st, but the next new moon shifts to February 31st. Hence February now has a blue moon, while neither January nor March has a blue moon!
On the other hand, supermoons and lunar eclipses still exist regardless of the calendar. Hence Ralph respects supermoons and lunar eclipses more than "blue moons."

Coding Square One TV's "Angle Dance"

I want to code one song on our computer emulator in each vacation post -- in particular, I'd like to code songs I sang in class. Even though I didn't want to code Square One TV songs, two songs in particular -- "Triangle Song" and "Angle Dance" -- are well-suited for the New 7-Limit Scale.

In class last year, I sang "Triangle Song" in December and "Angle Dance" in January, and I was hoping to code the songs in their corresponding months. But as it turns out, "Triangle Song" is much more challenging to code. I need more time to plan it correctly, and so I'll switch things up and code "Angle Dance" in this post.

Here's a first attempt at the coding:

10 DIM S(9)
15 FOR V=1 TO 3
20 FOR X=0 TO 9
40 NEXT
45 DATA 54
50 DATA 105,96,90,84
60 DATA 81,72,70,63,60
70 N=1
80 FOR X=1 TO 68
100 SOUND 261-N*S(A),T
110 NEXT X
120 FOR Y=1 TO V
130 FOR X=1 TO 27
150 SOUND 261-N*S(A),T
160 NEXT X,Y
170 RESTORE
180 DATA 7,4,7,2,7,2,7,4,5,2,4,2,5,4,4,8
190 DATA 8,2,8,2,8,4,8,2,8,2,8,4,4,4,4,12
200 DATA 4,4,5,4,5,4,5,4,5,2,5,2,5,4,1,4,1,4
210 DATA 1,2,1,2,4,4,4,4,4,4,5,4,4,2,2,2,1,12
220 DATA 7,4,7,2,7,2,7,4,5,2,4,2,5,4,4,8
230 DATA 8,2,8,2,8,4,8,2,8,2,8,4,4,4,4,12
240 DATA 4,4,5,4,5,4,5,4,5,2,5,2,5,4,1,4,1,4
250 DATA 1,2,1,2,4,4,4,4,4,4,5,4,4,2,2,2,1,12
260 DATA 3,2,3,2,5,12,5,4,5,4,3,8
270 DATA 0,4,3,2,3,2,3,4,5,4,5,4,5,12
280 DATA 3,2,3,2,5,12,5,4,5,4,3,8
290 DATA 9,4,9,2,9,2,9,4,9,4,0,4,6,4,5,8
300 DATA 3,2,3,2,5,12,5,4,5,4,3,8
310 DATA 0,4,3,2,3,2,3,4,5,4,5,4,5,12
320 DATA 3,2,3,2,5,12,5,4,5,4,3,8
330 DATA 9,4,9,2,9,2,9,4,9,4,0,4,6,4,5,8
340 DATA 3,2,3,2,5,12,5,4,5,4,3,8
350 DATA 0,4,3,2,3,2,3,4,5,4,5,4,5,12
360 DATA 3,2,3,2,5,12,5,4,5,4,3,8
370 DATA 9,4,9,2,9,2,9,4,9,4,0,4,6,4,5,8
380 NEXT V

This song fits the New 7-Limit Scale because it switches from major to minor, and my New 7-Limit Scale combines major and minor notes. But the problem is that it switches from G major, not to G minor, but to C minor (in the refrain). This C minor part does use the Bb in our scale, but it also uses the Eb that's available in the Extended Scale. The Eb is only in the lower octave as Sound 126 (Degree 135) -- as its degree is odd, it can't be halved to raise it an octave.

To include the Eb, let's lower it to octave N = 2:

45 DATA 67.5
70 N=2

With N = 1, this causes an error since there's no Degree 67.5, but when N = 2 there is no error. Of course, as far as which D to use, greenish D fits with (greenish) G major, while white D fits with (white) C minor.

One thing about this song on Square One TV is that its lead singer (Larry) is a baritone, while its backup singer (Reg E.) is a bass. I've mentioned before that while the key of G is convenient for the computer, it's not convenient for my singing range (G-g is a bit low, while g-g' is a bit high).

But fortunately, we notice that not only does the high g' not appear in the song (which is why we changed S(0) to eb'), but Larry the baritone never sings f'. Instead, Reg E. the bass sings f. So I can avoid singing any note higher than e' by jumping down to a lower octave -- and it's justified because I'm jumping down to sing Reg E.'s bass part.

Notice line 120 FOR Y=1 TO V. This sets up the refrain to repeat once after the first verse, twice after the second verse, and thrice after the third verse -- just like the actual song on TV. But unfortunately, this forces us to repeat so many DATA lines. Again, since many songs repeat a lot, it would be so much more convenient if we could use Atari's RESTORE command, which would allow us to specify which line of DATA to RESTORE.

Oh, and speaking of which -- no, I didn't find an Atari emulator, so I won't compose 16-bit music any time soon. By the way, I keep calling it "the emulator," but emulators have proper names. The proper name of our emulator is "Mocha":

http://www.haplessgenius.com/mocha/

Here's a YouTube clip of the Angle Dance song, so you can compare the version we programmed on Mocha to the original song:

Conclusion: New Year's (New Yerm's?) Resolutions

Since it's New Year's Eve, let me declare my New Year's Resolutions. I will list them today and then explain the rationale for them later this week, in my final vacation post.

1. Implement a classroom management system based on how students actually think.
2. Keep a calm voice instead of yelling at students.
3. Move on from past incidents instead of bringing them up with students.
4. Begin the lesson quickly instead of having lengthy warm-ups
5. Engage the students in the learning process instead of lecturing excessively.
6. If there is a project-based curriculum such as Illinois State, then implement all components of it.
7. If there is an official assignment to review for state testing, then implement it fully.

Of course, I can't keep any of these resolutions unless I'm in a classroom -- and I don't know whether I'll be hired to teach in 2018. Therefore, I declare these to be New Yerm's Resolutions so that I'll have until the end of the yerm -- June 3rd, 2019 -- to keep them. In other words, I have the rest of this school year and all of the next.

Yes, 2017 was a very tough year for me -- perhaps the toughest year of my life. If I am to have a better 2018 in the classroom, I must keep the above resolutions. And I will keep them -- but only if I am given the chance.

Happy New Year -- or should I say, Happy New Yerm!

## Thursday, December 28, 2017

### Kwanzaa Post: Continued Fractions and Calendar Reform

1. Pappas, Poincare, and L'Engle
2. The Kwanzaa Celebrant in My Class
3. Ogilvy and Continued Fractions
4. Coding Continued Fractions in BASIC
5. Coding Continued Fractions in TI-BASIC
6. Continued Fractions and Calendar Reform
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)

Pappas, Poincare, and L'Engle

This is what Theoni Pappas writes on page 58 of her Magic of Mathematics:

"There is an astonishing imagination even in the science of mathematics."
-- Voltaire

This is the first page of the section "Mathematical Worlds in Literature." Pappas tells us that several authors write about math in their fiction.

"Is the tesseract the figment of a mathematical imagination? We learn in Euclidean geometry that a point only shows location, and it cannot be seen since it has zero dimension. A line is infinite in length, yet does such a figure exist in the realm of our lives? A plane is infinite in two dimensions and only one point thick. Consider the pseudosphere of hyperbolic geometry; asymptotic lines of exponential functions, infinities of transfinite numbers. One wonders if these can exist in our world.

"Many writers, artists and mathematicians have ingeniously used these concepts to describe worlds where these ideas come to life."

The first author Pappas mentions in this section is Poincare -- the formulator of a famous conjecture, but also, as I mentioned earlier, the creator of the Poincare hyperbolic disk. Pappas writes:

"In the 19th century, mathematician Henri Poincare created a model of a hyperbolic world contained in the interior of a circle. Here to all things and inhabitants, their circular world was infinite. Unbeknownst to these creatures, everything would shrink as it moved away from the center of the circle, while growing as it approached the center. This meant that the circle's boundary was never to be reached, and hence their world appeared infinite to them."

Here's a link to the Poincare hyperbolic disk:

http://mathworld.wolfram.com/PoincareHyperbolicDisk.html

In past years, I used to write about hyperbolic geometry, because this theory is "neutral," differing from Euclidean geometry merely by denying the Fifth Postulate. (On the other hand, the parallel postulate is true in spherical geometry -- we must change other axioms to obtain spherical geometry.)

I stopped writing about hyperbolic geometry because it's less intuitive than spherical geometry -- for the simple reason that we live on a spherical earth. But since we read about it here and Pappas -- and since it's still vacation time -- let's take some time to learn about hyperbolic geometry.

OK, so objects on the Poincare disk shrink as they approach the boundary. So what exactly does this have to do with denying the Fifth Postulate? Well, if two lines appear to intersect outside the boundary, these lines are in fact parallel (ultraparallel), since the boundary can't be reached. Two lines that would intersect on the boundary are horoparallel. Hence through a point not on a line there are infinitely many lines parallel to that line, and so Playfair fails.

The Wolfram link above contains a picture of MC Escher's representation of the Poincare disk -- Pappas includes such a picture in her book as well. The Wolfram link also shows a short animation of what appears to be a "rotation" about a point on the circle. Since the point lies on the boundary, the so-called "rotation" is actually a horolation -- the fifth isometry that doesn't exist in normal geometry.

Here's a link to a Numberphile video on hyperbolic geometry:

The Poincare disk doesn't appear only the 8:30 mark of this video -- instead another model of hyperbolic geometry is featured (the half-plane model).

Meanwhile, Pappas also writes about Madeleine L'Engle's book A Wrinkle in Time. Even though she writes about this on pages 59-60 rather than 58, I include it in today's post since the movie -- starring Oprah Winfrey -- is coming out in just over two months:

"For her novel A Wrinkle in Time, Madeleine L'Engle uses the tesseract and multiple dimensions as means of allowing her characters to travel though outer space. '..for the 5th dimension you'd square the fourth and add that to the other four dimensions and you can travel though space without having to go the long way around...In other words a straight line is not the shortest distance between two points.'"

(Yes, that last line appears in the movie trailer.) Recall that even though a tesseract is a 4D hypercube, L'Engle labels it as 5D because she's including time as the Einsteinian fourth dimension, so the tesseract must be 5D.

At this point, you may wonder why adding another dimension means that the shortest distance between two points is no longer a straight line. Well, actually the shortest distance between two points is a straight line only in Euclidean geometry. We've already seen that the shortest distance between two points (a "geodesic") in spherical geometry is a great circle.

To understand what L'Engle is doing here, let's bump everything down a dimension. So instead of (counting only the spatial dimensions) using a 4D tesseract to travel across the 3D universe, let's use a 3D cube to travel across 2D Flatland. We can model Flatland using a sheet of paper, except that this paper isn't flat, but folded (or "wrinkled"). The cube then is a tube connecting one folded half of this paper to the other half. It's much shorter, then, for a Flatlander to travel through the cube to the other side than it is to go the long way through Flatland (staying on the sheet of paper).

In fact, it's even possible that L'Engle's universe is hyperbolic like the Poincare disk! In this case, the places where people live are near the boundary of the disk. The circle is small, but people living near the boundary are very tiny, so the universe appears vast to them. Ordinary, people must traverse long distances to travel anywhere else on the disk. But instead, we shorten distances very easily -- travel to the center of the disk (which causes us to grow to a humongous size), walk a single huge step in the correct direction, and then approach the destination (shrinking back to the original size). Notice that the boundary of the Poincare disk is a 1D manifold (the exterior of the 2-ball), and so the people who live in this universe are Linelanders. We then bump it up two dimensions. Then it becomes 3D people living near the image of the 3-sphere, and they travel through the 4-ball across the universe.

Unfortunately, if L'Engle's universe were hyperbolic, it would be incorrect to call the 4-ball through which we travel a "tesseract." Squares don't exist in hyperbolic geometry, hence neither can cubes, and neither can tesseracts. But there might be a way to make the universe the boundary of a tesseract rather than a 4-ball in order to make her story work out.

I've written about L'Engle's universe a couple of times on this blog, but I haven't decided yet whether I'll actually watch the movie when it comes out. I still have over two months to decide -- but I almost have to since I keep writing about it so much!

One thing that annoys me is when I'm searching for something and I stumble upon something I wish I'd found weeks earlier. When I was searching for the hyperbolic geometry video above, I stumbled upon the following Numberphile video on Ricci flow:

I wrote about Ricci flow as we read the Poincare book, but since I gave only excerpts and skipped over large portions of the book, I feel that the readers don't really understand what Ricci flow is (and admittedly, neither do I). This video explains what Ricci flow is and how it was used to prove the Poincare conjecture. (I might as well include it since I already added the "Poincare" label.) There is also a Numberphile video on the Poincare conjecture itself, but I don't link to it here.

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 last year, one of the eighth grade girls in my class celebrated Kwanzaa. (I didn't mention this last 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 76. 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 last 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 last 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.)

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.

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!"

Coding Continued Fractions in BASIC

Ogilvy doesn't use the following notation in his book, but there's a simpler way to write all of the continued fractions that he mentions in this chapter:

45/14 = [3; 1, 4, 2]
87/37 = [2; 2, 1, 5, 2]
sqrt(2) = [1; 2, 2, 2, 2, 2, 2, ...]
sqrt(a^2 + 1) = [a; 2a, 2a, 2a, ...]
sqrt(3) = [1; 1, 2, 1, 2, 1, 2, ...]
e = [2; 1, 2, 1, 1, 4, 1, 1, 6, ...]

Let's write programs to find continued fractions, in both BASIC and TI-BASIC:

http://www.haplessgenius.com/mocha/

10 INPUT X
20 PRINT INT(X);
30 X=X-INT(X)
40 IF X<=.001 THEN END
50 X=1/X
60 GOTO 20

In this program, only decimals can be entered, not fractions or square roots. So we may require the computer to PRINT 45/14 or PRINT SQR(2) before we RUN the program.

Line 40 ought to say IF X=0, but it's obvious that decimals can't be written exactly -- we can't even express 1/3 exactly, after all -- and so errors are inevitable. So this program has a .001 tolerance. But even with this tolerance, errors are inevitable especially with irrational inputs. The computer displays a few 2's when sqrt(2) is inputted, but soon many spurious values appear. (Press "Esc" to stop the computer as soon as the non-2's appear.)

For the rationals, the computer will often display a list ending with 1. Ogilvy does tell us, after all, that since 1/1 = 1, the two continued fractions are equivalent:

[a; b, c, d, ..., n]
[a; b, c, d, ..., n-1, 1]

Lists ending in 1 appear because of rounding error again -- a final 2, for example, may be stored in the computer as 1.9999 instead. The computer can't convert 1.9999 directly to 2 because of the INT (floor) function -- instead, 1.9999 becomes 1. The extra .9999 is inverted to 1.0001 (or thereabouts), and that's where the final 1 comes from. The last .0001 is within the tolerance .001, and so it ends.

For fractions, it may be annoying to find their decimal values first, so instead we could write:

5 INPUT P,Q
10 X=P/Q

This doesn't allow us to input irrational values -- but since the computer is inaccurate for irrationals, perhaps it's better not to allow irrational inputs.

Coding Continued Fractions in TI-BASIC

In TI-BASIC, we write:

PROGRAM:CONTFRAC
:Input X
:{iPart(X)}->L1
:fPart(X)->X
:2->A
:While (A<99)(X>
.001)
:1/X->X
:iPart(X)->L1(A)
:fPart(X)->X
:A+1->A
:End
:L1

This time, we store our continued fraction in a list variable L1, while A keeps track of the size of the list variable. The program stops when either the list reaches length 99, or the tolerance is met.

Interestingly enough, the calculator gives the correct list for the irrational sqrt(2), with a 1 followed by nothing but 2's. For sqrt(3) and all higher square roots, errors are inevitable. For the number e, the last correct values are 10, 1, 1, but then 13 appears instead of 12. The next two values after 13 are indeed 1's, then all further values are incorrect. On the computer, when we enter e, the last correct values are 8, 1, 1.

Of course, perhaps we should change 99 to a more realistic value, since the calculator will almost never find 99 correct values except for a few special numbers like sqrt(2). For example, since e produced 17 correct values, maybe we should change this to 17, or 19 at the most.

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.

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):

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:

http://www.huygens-fokker.org/bpsite/contfract.html

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:

http://z13.invisionfree.com/DozensOnline/index.php?showtopic=1724

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:

https://www.atariarchives.org/c3ba/page045.php

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:

• In 8-bit, there is only one just major scale. In 16-bit, we have 65536/180 = 364 major scales. So we can play a different major scale every day of the year (except blank day of course).
• It's easy to modulate a song like Dolly Parton's "Hard Candy Christmas" up a whole tone -- by which we mean a justly tuned 9/8. The original scale must begin on a multiple of 180 * 9 (or 1620) and the new scale begins on a multiple of 180 * 8 (or 1440). There are still 65536/1620, or 40, different ways we can modulate a major scale by 9/8. It's even possible to play a song that can be modulated up by 9/8 twice -- begin on a multiple of 180 * 81 = 14580, which can be played in 65536/14580, or four, different ways.
• To play a 4:5:6:7:8 harmonic seventh chord required starting on a multiple of 210. There are now 65536/210 = 312 different harmonic seventh chords.
• In fact the New 7-Limit Scale was created around the limitations of 8-bit music. It's possible to create more 7-limit scales that have more otonal (or happier-sounding) notes since 16-bit can accommodate the higher numerators.
• The least common numerator of the Bohlen-Pierce scale is 3^3 * 5^2 * 7^2 = 33075. Hence a full just BP scale is playable in 16-bit. If we restrict ourselves only to the notes of the Lambda mode, then the least common numerator is only 1575. So there are 65536/1575 = 41 different Lambda scales that can be played. The easiest way to play a mode other than Lambda (such as Walker I) is to play Lambda starting from another note (F in this case).
• It's easier to extend beyond the 7-limit into the 11- and 13-limits. Multiples of 11 and 13 grow quickly in 8-bit but can be accommodated in 16-bit, as the product of all the primes up to 13 is only 30030, a 16-bit number.
• Just as 12EDO sounds better in 16-bit, it's possible to estimate other EDO's as well. EDL-based music isn't designed to accommodate EDO's, but with 65536 notes available it's easier to approximate any scale, including EDO's. With 8-bit, only lower EDO's are easy to approximate with only 16-EDO sounding reasonable of the EDO's past 12. In 16-bit, we expect to be able to go well beyond 16-EDO.
• According to the chart, 16-bit music goes deeper into the baritone and bass ranges. (I assume that the octaves are piano notation, so middle C is in Octave 4.) This is especially important for tritave music, since my strong tritave is from A2 to E4.
But all of this is for the Atari, not the Color Computer. The BASIC programs listed here can't be run on the Color Computer emulator, such as:

SOUND 0,0,0,0

This is an error on my computer. My SOUND command can only take two arguments, not four -- and none of those arguments are permitted to be zero. Still, I recognize the POKE command, which implies that machine language is being used. I wonder whether any of the music .BIN files on the Color Computer emulator are written in 16-bit.

Conclusion: "The Twelve Days of Christmath" (Vi Hart)

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!)

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

Happy third day of Kwanzaa! Happy fourth day of Christmas! My next post will be New Year's Eve.