July 2013

# Mental Math

By Paul Ramirez A DAY FOR ANY DATE
In this issue’s installment, we consider one of the classic feats of mental calculation: how to figure out the day of the week of anyone’s birthday. This is actually a very practical skill. It’s not every day that someone will ask you to square a three-digit number, but hardly a day goes by without somebody mentioning a date to you in the past or future. With just a little bit of practice, you can quickly and easily determine the day of the week of practically any date in history.

First we assign a code number to every day of the week. They are easy to remember:

 Number Day 1 Monday 2 Tuesday 3 Wednesday 4 Thursday 5 Friday 6 Saturday 7 or 0 Sunday

I have found the above list to be easy to remember, especially since 2’s day is Tuesday. The other days can be given similar mnemonics: “1 day is Monday, 4’s day is Thursday, and 5 day is Friday.” For Wednesday, notice that if you hold up three fingers, you get the letter w. For the weekends (at the end of our list), you might think of Saturday as 6-urday and Sunday as 7 day. Or to remember the zero, you could think of Sunday as none-day or nun-day!

Next we need a code for every month of the year. These month codes are used for every year, with two exceptions. In a leap year (like 2000 or 2004 or 2008 or ...) the month code for January is 5, and the month code for February is 1. To make the month codes easier to remember, we provide a table of mnemonics below.

 Month Code Mnemonic January 6* W-I-N-T-E-R has 6 letters. February 2 February is the 2nd month of the year. March 2 March 2 to the beat of the drum! April 5 A-P-R-I-L and F-O-O-L-S have 5 letters. May 0 May I have a sandwich? Hold the May-O! June 3 June B-U-G has 3 letters. July 5 Watching FIVER-works and FIVER-crackers! August 1 August begins with A, the 1st letter. September 4 September is the beginning of F-A-L-L. October 6 Halloween T-R-I-C-K-S and T-R-E-A-T-S November 2 I’ll have 2 servings of Turkey please! December 4 December is the L-A-S-T month, or X-M-A-S

Now let’s calculate the day of the week for any date in 2006. After that, we will describe 2007, then 2008, and so on, for the rest of your life. Once all future dates are taken care of, we can look back into the past and determine the days of the week for any date in the 1900s or any other century.

Every year is assigned a code number, and for 2006 that year code happens to be 0 .

Now, to calculate the day of the week, you simply add the month code plus the date code plus the year code. Thus for December 3, 2006, we compute

Month Code + Date + Year Code = 4 + 3 + 0 = 7

Hence, this date will be on Day 7, which is Sunday.

How about Nov. 18, 2006? Since November has a month code of 2, we have

Month Code + Date + Year Code = 2 + 18 + 0 = 20.

Now since the week repeats every seven days, we can subtract any multiple of 7 from our answer (7, 14, 21, 28, 35, ...) and this will not change the day of the week. So our final step is to subtract the biggest multiple of 7 to get 20 − 14 = 6. Hence Nov. 18, 2006, occurs on Saturday.

How about 2007? Well, what happens to your birthday as you go from one year to the next? For most years, there are 365 days, and since 364 is a multiple of 7 (7 × 52 = 364), then the day of the week of your birthday will shift forward by one day in most years. If there are 366 days between your birthdays, then it will shift forward by two days. Hence, for 2007 we calculate the day of the week just as before, but now we use a year code of 1. Next, 2008 is a leap year. (Leap years occur every four years, so 2000, 2004, 2008, 2012, …, 2096 are the leap years of the 21st century.) Hence, for 2008, the year code increases by two, so it will have a year code of 3. The next year, 2009, is not a leap year, so the year code increases by one, to 4.

Thus, for example, May 2, 2007, has

Month Code + Date + Year Code = 0 + 2 + 1 = 3

so this date is a Wednesday.

For Sept. 9, 2008, we have

Month Code + Date + Year Code = 4 + 9 + 3 = 16

Subtracting the biggest multiple of 7, we have 16 − 14 = 2, so this date is a Tuesday.

On the other hand, Jan. 16, 2008, is a leap-year January, so its month code will be 5 instead of 6. Thus, we have

Month Code + Date + Year Code = 5 + 16 + 3 = 24

and therefore occurs on day 24 − 21 = 3, which is Wednesday. For your reference, we have listed all of the year codes for the 21st century in the figure on the following page.

The good news is that we do not have to memorize this table. We can mentally calculate the year code for any date between 2000 and 2099. For the year code of 2000 + x, we simply take the number x/4 (ignoring any remainder) and add that to x. The year code can be reduced by subtracting any multiple of 7.

For example, with 2061, we see that = 15 (with a remainder of 1 that we ignore). Thus 2061 has a year code of 61 + 15 = 76. And since we can subtract any multiple of 7, we use the simpler year code of 76 − 70 = 6.

 Year Code Year Code Year Code Year Code 2000 0 2025 3 2050 6 2075 2 2001 1 2026 4 2051 0 2076 4 2002 2 2027 5 2052 2 2077 5 2003 3 2028 0 2053 3 2078 6 2004 5 2029 1 2054 4 2079 0 2005 6 2030 2 2055 5 2080 2 2006 0 2031 3 2056 0 2081 3 2007 1 2032 5 2057 1 2082 4 2008 3 2033 6 2058 2 2083 5 2009 4 2034 0 2059 3 2084 0 2010 5 2035 1 2060 5 2085 1 2011 6 2036 3 2061 6 2086 2 2012 1 2037 4 2062 0 2087 3 2013 2 2038 5 2063 1 2088 5 2014 3 2039 6 2064 3 2089 6 2015 4 2040 1 2065 4 2090 0 2016 6 2041 2 2066 5 2091 1 2017 0 2042 3 2067 6 2092 3 2018 1 2043 4 2068 1 2093 4 2019 2 2044 6 2069 2 2094 5 2020 4 2045 0 2070 3 2095 6 2021 5 2046 1 2071 4 2096 1 2022 6 2047 2 2072 6 2097 2 2023 0 2048 4 2073 0 2098 3 2024 2 2049 5 2074 1 2099 4

Hence March 19, 2061, has

Month Code + Date + Year Code = 2 + 19 + 6 = 27

Subtracting 27 − 21 = 6 tells us that this date will take place on Saturday.

What about birthdates between 1900 and 1999? Do the problem exactly as in the previous calculation, but shift the final answer forward by one day (or simply add 1 to the year code). Thus March 19, 1961, occurred on a Sunday.

For the date Dec. 3, 1998, we have 98/4 = 24 (with a remainder of 2 that we ignore). Thus 1998 has year code 98 + 24 + 1 = 123, where the plus one is added for dates in the 1900s. Next, subtract the biggest multiple of 7. For handy reference, here are the multiples of 7 that you might need:

7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, ...

Since 123 − 119 = 4, 1998 has a year code of 4. Therefore, Dec. 3, 1998, has

Month Code + Date + Year Code = 4 + 3 + 4 = 11

and 11 − 7 = 4, so this date occurred on a Thursday.

For dates in the 1800s, we add 3 to the year code. For example, Charles Darwin and Abraham Lincoln were both born on Feb. 12, 1809. Since 2009 has a year code of 4, then 1809 has a year code of 4 + 3 = 7, which can be reduced to 0. Thus, Feb. 12, 1809, has

Month Code + Date + Year Code = 2 + 12 + 0 = 14

and 14 − 14 = 0, so they were both born on a Sunday.

For dates in the 2100s, we add 5 to the year code (or, equivalently, subtract 2 from the year code). For example, since 2009 has a year code of 4, then 2109 has a year code of 4 + 5 = 9, which, after subtracting 7 is the same as a year code of 2. Dates in the 1700s are treated just like in the 2100s (by adding 5 or subtracting 2) but we need to be careful. The days that we are calculating are based on the Gregorian calendar, established in 1582. But this calendar was not adopted by England (and the American colonies) until 1752, when Wednesday, Sept. 2, was followed by Thursday, Sept. 14. Let’s verify that September 14, 1752, was indeed a Thursday. Since 2052 has a year code of 2 (from this page, or by 52 + 13 − 63 = 2), then 1752 has a year code of 0. Thus Sept. 14, 1752, has

Month Code + Date + Year Code = 4 + 14 + 0 = 18

and 18 − 14 = 4, so it was indeed a Thursday. However, our formula will not work for earlier dates (which were governed by the Julian calendar).

Finally, we remark that under the Gregorian calendar, a leap year occurs every four years, with the exception of years that are divisible by 100, although there is an exception to the exception: years divisible by 400 are leap years. Thus 1600, 2000, 2400, and 2800 are leap years, but 1700, 1800, 1900, 2100, 2200, 2300, and 2500 are not leap years. In fact, the Gregorian calendar repeats every 400 years, so you can convert any future date into a date near 2000. For example, March 19, 2361, and March 19, 2761, will have the same day of the week as March 19, 1961, which, as we already determined, is a Sunday.

From Secrets of Mental Math: The Mathemagician's Guide to Lightning Calculation and Amazing Math Tricks by Arthur Benjamin and Michael Shermer, copyright © 2006 by Arthur Benjamin and Michael Shermer. Used by permission of Three Rivers Press, a division of Random House, Inc. Any third party use of this material, outside of this publication, is prohibited. Interested parties must apply directly to Random House, Inc. for permission.