play and relax: games for kids games
  Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Learn to enjoy mathematics.
Google
Web CTK
Best sites for teachers
Sites for teachers
Sites for parents
Terms of use
Awards

Interactive Activities
CTK Exchange
CTK Insights - a blog

Games & Puzzles
What Is What
Arithmetic/Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Best sites for teachers
Sites for teachers
Sites for parents

Education & Parenting

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

Subject: Day of the week
Date: Wed, 17 Jun 1998 02:20:15 -0400
From: Roger C. Evans

If I later recall in what text I encountered the working out of the day-of-week-from-date problem I'll send the reference on (possibly Oystein Ore's "Number Theory and Its History"?). In any case, the following computation will allow you to reconstruct tables for your memory trick (that'll work for any dates in the Gregorian calendar):

USING THESE CONVENTIONS:
------------------------

-- for a real-date = (month, day, year): IF month is NOT Jan. or Feb., let the "working-date" be the real-date; OTHERWISE, let working-date be (month, day, year-1). Identify the working-date as the number triplet (M, D, Y), where M = 1, ... ,12 for March, ... , December, Jan, and Feb. respectively (note the cyclic shift!) and D = the day number in the month. Represent year Y by Y1 and Y2, given respectively by first and last two digits of Y (thus Y = 1941 --> Y1 = 19, and Y2 = 41).

-- G(x) = "greatest integer in x";
thus G(10.3) = 10 = G(10).

-- Q(m;n) = "quotient m over n" = G(m/n);
thus Q(18;4) = G(4.5) = 4.

-- R(m;n) = "remainder m over n" = m - n*Q(m;n);
thus R(39;7) = 39 - 7*5 = 4.

THE RESULT IS A "MOD 7" CALCULATION:
------------------------------------

Set X = 2*M + D + 5*Y1 + Y2 + Q(3*M-1;5) + Q(Y1;4) + Q(y2:4).

Then ANS = R(X;7),

    where
    0 -->Sunday; 1 -->Monday; ...; and 7 -->Saturday.

-----------------------------------------------------
EXAMPLES:
---------

  1. Real date (Dec. 7, 1941) --> (M, D, Y1, Y2) = (10, 7, 19, 41)
    so
      X = 2*M + D + 5*Y1 + Y2 + Q(3*M-1;5) + Q(Y1;4) + Q(y2:4)
      = 20 + 7 + 95 + 41 + 5 + 4 + 10 = 182.

    ANS = R(182;7) = 0 --> Sunday.

  2. One may of course work mod 7 throughout:
    Real date (Jan. 1, 2000) --> working date (Jan. 1. 2000) -->
    (M, D, Y1, Y2) = (11, 1, 19, 99)
    so
      X = 2*M + D + 5*Y1 + Y2 + Q(3*M-1;5) + Q(Y1;4) + Q(y2:4)
      = 1 + 1 + 4 + 1 + 6 + 4 + 3
      = 6 --> Saturday.
--------------------------------------------------------------------

 

 

Copyright © 1996-2008 Alexander Bogomolny

29397638Page copy protected against web site content infringement by Copyscape


Search:
Keywords:


Latest on CTK Exchange
try this puzzle ?/?? + ?/?? + ?/? ...
Posted by albert1950
0 messages
07:05 AM, Jul-10-08

Monty Hall Problem
Posted by linkdon
71 messages
03:06 PM, Jul-18-08

Missing information
Posted by roboknight
2 messages
07:32 AM, Jun-22-08

Golden Number linked to 666
Posted by Titus
4 messages
02:53 PM, Jul-19-08

Mistake on the page (an aside, Be ...
Posted by Max
4 messages
10:28 AM, Feb-28-08

trisection of an angle
Posted by Pytheus
2 messages
06:39 AM, Jul-14-08

You can drill a square hole
Posted by Giorgis
1 messages
10:15 PM, Jul-12-08