## Posts tagged ‘floor function’

### Good Luck on Friday the 13th

A friend is taking a business trip today, and I asked if he was worried about flying on Friday the 13th. “I think it’s unlucky to have superstitions,” he replied.

If you’re a baseball player and you see a cross-eyed woman today, you might want to spit in your hat to avoid bad luck. (Or so they say.)

As it turns out, the first Friday the 13th of each year is “Blame Someone Else Day,” so if you don’t like this post, you should defintely let my wife know about it.

To ensure that you point a finger at others on the correct day, wouldn’t it be helpful to know when the first Friday the 13th of the year will occur? Consider yourself lucky, because you’ve stumbled across this post. I have two methods you can use for determining which months contain a Friday the 13th.

Method 1: Look-Up Table

Take the last two digits of the year, yy.

1. Calculate the sum yy + ⌊yy/4⌋. (The notation ⌊x⌋ indicates the floor function, which is the greatest integer less than x, so ⌊π⌋ = 3 and ⌊7.28⌋ = 7, for example.)
2. Determine the remainder when that sum is divided by 7.
3. Look up the remainder in the table below.

For example, in 2013, the calculations would give 13 + ⌊13/4⌋ = 13 + 3 = 16, which has a remainder of 2 when divided by 7. Since 2013 is a non-leap year, the table tells us that Friday the 13th will occur in September and December this year.

Note that the table only works for dates in the 2000’s. To modify the process for dates in the 1900’s, you need to add 1 in the first step; that is, find the sum yy + ⌊yy/4⌋ + 1. Then proceed as described above.

Also note that four lines in the table are highlighted in pink and yellow. Leap years always cause problems. The yellow lines in the table indicate years in which an extra Friday the 13th occurs in January or Feburary because of leap year, and the pink lines indicate years in which a Friday the 13th in January or February does not occur because of leap year.

Method 2: Internet

Go to http://www.timeanddate.com/calendar, enter the year in question, and examine all 12  months to see which contain a Friday the 13th.

[Ed. Note: Though perhaps more efficient, the use of Method 2 is highly discouraged and less fun than Method 1. Using Method 2 instead of Method 1 will result in the automatic revocation of your Geek Card. Plus, there’s a practical issue: What will you do when you have a time-sensitive need to know the month of the first Friday the 13th in the year 2044, say, and you find yourself in a location without Internet access? Shudder. Consequently, learning Method 1 is just as critical to you as learning to calculate change mentally is to a grocery store cashier, who lives in perpetual fear of power outages.]

Incidentally, there is at least one Friday the 13th every year. In addition, every month has four Fridays the 13th in a 28-year period, which means there are an average of 1.71 Fridays the 13th each year. (There is a slight snafu regarding this last fact, because years ending in 00 aren’t leap years if the year is not a multiple of 400, but whatever. It’s true most of the time.)

The Math Jokes 4 Mathy Folks blog is an online extension to the book Math Jokes 4 Mathy Folks. The blog contains jokes submitted by readers, new jokes discovered by the author, details about speaking appearances and workshops, and other random bits of information that might be interesting to the strange folks who like math jokes.

## MJ4MF (offline version)

Math Jokes 4 Mathy Folks is available from Amazon, Borders, Barnes & Noble, NCTM, Robert D. Reed Publishers, and other purveyors of exceptional literature.