Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Doomsday rule
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Finding a year's doomsday== First take the anchor day for the century. For the purposes of the doomsday rule, a century starts with '00 and ends with '99. The following table shows the anchor day of centuries 1600β1699, 1700β1799, 1800β1899, 1900β1999, 2000β2099, 2100β2199 and 2200β2299. {| class="wikitable" style="margin: 1em auto 1em auto" ! Century || Anchor day || Mnemonic || Index (day of week) |- | 1600β1699 || Tuesday || β || 2 (Twoday) |- | 1700β1799 || Sunday || β || 0 (Noneday) |- | 1800β1899 || Friday || β || 5 (Fiveday) |- | 1900β1999 || Wednesday || We-in-dis-day<br />(most living people were born in that century, see [[List of countries by median age]]) || 3 (Treblesday) |- | '''2000β2099''' || Tuesday || Y-Tue-K or Twos-day<br />([[2000|Y2K]] was at the head of this century) || '''2 (Twosday)''' |- | 2100β2199 || Sunday || Twenty-one-day is Sunday<br />(2100 is the start of the next century) || 0 (Noneday) |- | 2200β2299 || Friday || β || 5 (Fiveday) |} For the Gregorian calendar: :'''Mathematical formula''' :{{math|5 Γ (''c'' mod 4) mod 7 +}} Tuesday = anchor. :'''Algorithmic''' :Let {{math|1=''r'' = ''c'' mod 4}} :if {{math|1=''r'' = 0}} then anchor = Tuesday :if {{math|1=''r'' = 1}} then anchor = Sunday :if {{math|1=''r'' = 2}} then anchor = Friday :if {{math|1=''r'' = 3}} then anchor = Wednesday For the Julian calendar: :{{math|6''c'' mod 7 +}} Sunday = anchor. Note: <math>c = \biggl\lfloor {\text{year} \over 100} \biggr\rfloor </math>. Next, find the year's anchor day. To accomplish that according to Conway:<ref>John Horton Conway, {{cite web |url=https://www.archim.org.uk/eureka/archive/Eureka-36.pdf|title=Tomorrow is the Day After Doomsday |page=29-30 |date=October 1973 |publisher=Eureka |quote=Each ordinary year has its Doomsday 1 day later than the previous year, and each leap year 2 days later. It follows that within any given century a dozen years advances Doomsday by 12 + 3 = 15 days = 1 day. ('A dozen years is but a day.') So we add to the Doomsday for the century year the number of dozens of years thereafter, the remainder, and the number of fours in the remainder.}}</ref> #Divide the year's last two digits (call this {{math|''y''}}) by 12 and let {{math|''a''}} be the [[floor and ceiling functions|floor]] of the [[quotient]]. #Let {{math|''b''}} be the remainder of the same quotient. #Divide that remainder by 4 and let {{math|''c''}} be the floor of the quotient. #Let {{math|''d''}} be the sum of the three numbers ({{math|''d'' {{=}} ''a'' + ''b'' + ''c''}}). (It is again possible here to divide by seven and take the remainder. This number is equivalent, as it must be, to {{math|''y''}} plus the floor of {{math|''y''}} divided by four.) #Count forward the specified number of days ({{math|''d''}} or the remainder of {{math|{{sfrac|''d''|7}}}}) from the anchor day to get the year's one. :<math>\begin{matrix}\left({\left\lfloor{\frac{y}{12}}\right\rfloor+y \bmod 12+\left\lfloor{\frac{y \bmod 12}{4}}\right\rfloor}\right) \bmod 7+\rm{anchor}=\rm{Doomsday}\end{matrix}</math> For the twentieth-century year 1966, for example: :<math>\begin{matrix}\left({\left\lfloor{\frac{66}{12}}\right\rfloor+66 \bmod 12+\left\lfloor{\frac{66 \bmod 12}{4}}\right\rfloor}\right) \bmod 7+\rm{Wednesday} & = & \left(5+6+1\right) \bmod 7+\rm{Wednesday} \\ \ & = & \rm{Monday}\end{matrix}</math> As described in bullet 4, above, this is equivalent to: :<math>\begin{matrix}\left({66 + \left\lfloor{\frac{66}{4}}\right\rfloor}\right) \bmod 7+\rm{Wednesday} & = & \left(66+16\right) \bmod 7+\rm{Wednesday} \\ \ & = & \rm{Monday}\end{matrix}</math> So doomsday in 1966 fell on Monday. Similarly, doomsday in 2005 is on a Monday: :<math>\left({\left\lfloor{\frac{5}{12}}\right\rfloor+5 \bmod 12+\left\lfloor{\frac{5 \bmod 12}{4}}\right\rfloor}\right) \bmod 7+\rm{Tuesday}=\rm{Monday}</math> ===Why it works=== [[File:Doomsday Rule.svg|thumb|Doomsday rule]] The doomsday's anchor day calculation is effectively calculating the number of days between any given date in the base year and the same date in the current year, then taking the remainder modulo 7. When both dates come after the leap day (if any), the difference is just {{math|365''y'' + {{sfrac|''y''|4}}}} (rounded down). But 365 equals 52 Γ 7 + 1, so after taking the remainder we get just :<math>\left(y + \left\lfloor \frac{y}{4} \right\rfloor\right) \bmod 7.</math> This gives a simpler formula if one is comfortable dividing large values of {{math|''y''}} by both 4 and 7. For example, we can compute :<math>\left(66 + \left\lfloor \frac{66}{4} \right\rfloor\right) \bmod 7 = (66 + 16) \bmod 7 = 82 \bmod 7 = 5</math> which gives the same answer as in the example above. Where 12 comes in is that the pattern of <math>\bigl(y + \bigl\lfloor \tfrac{y}{4} \bigr\rfloor \bigr) \bmod 7</math> ''almost'' repeats every 12 years. After 12 years, we get <math>\bigl(12 + \tfrac{12}{4}\bigr) \bmod 7 = 15 \bmod 7 = 1</math>. If we replace {{math|''y''}} by {{math|''y'' mod 12}}, we are throwing this extra day away; but adding back in <math>\bigl\lfloor \tfrac{y}{12} \bigr\rfloor</math> compensates for this error, giving the final formula. For calculating the Gregorian anchor day of a century: three βcommon centuriesβ (each having 24 leap years) are followed by a βleap centuryβ (having 25 leap years). A common century moves the doomsday forward by :<math> (100 + 24) \bmod 7 = 2 + 3 = 5 </math> days (equivalent to two days back). A leap century moves the doomsday forward by 6 days (equivalent to one day back). So ''c'' centuries move the doomsday forward by :<math> \left(5c + \biggl\lfloor {c \over 4} \biggr\rfloor \right) \bmod 7 </math>, but this is equivalent to :<math> (5 (c \bmod 4)) \bmod 7</math>. Four centuries move the doomsday forward by :<math> -2 - 2 - 2 - 1 = -7, \qquad -7 \equiv 0 \quad \pmod{7}</math>; so four centuries form a cycle that leaves the doomsday unchanged (and hence the βmod 4β in the century formula). ===The "odd + 11" method=== [[File:Odd+11 doomsday flowchart.svg|thumb|right|270px| A flowchart showing the Odd+11 method to calculate the anchor day]] A simpler method for finding the year's anchor day was discovered in 2010 by Chamberlain Fong and Michael K. Walters.<ref name=Odd11paper>Chamberlain Fong, Michael K. Walters: [https://arxiv.org/abs/1010.0765 "Methods for Accelerating Conway's Doomsday Algorithm (part 2)"], 7th International Congress on Industrial and Applied Mathematics (2011).</ref> Called the "odd + 11" method, it is equivalent<ref name=Odd11paper /> to computing :<math>\left(y + \left\lfloor \frac{y}{4} \right\rfloor\right) \bmod 7</math>. It is well suited to mental calculation, because it requires no division by 4 (or 12), and the procedure is easy to remember because of its repeated use of the "odd + 11" rule. Furthermore, addition by 11 is very easy to perform mentally in [[Decimal|base-10 arithmetic]]. Extending this to get the anchor day, the procedure is often described as accumulating a running total {{math|''T''}} in six steps, as follows: # Let {{math|''T''}} be the year's last two digits. #If {{math|''T''}} is odd, add 11. #Now let {{math|''T'' {{=}} {{sfrac|''T''|2}}}}. #If {{math|''T''}} is odd, add 11. #Now let {{math|''T'' {{=}} 7 β (''T'' mod 7)}}. #Count forward {{math|''T''}} days from the century's anchor day to get the year's anchor day. Applying this method to the year 2005, for example, the steps as outlined would be: #{{math|''T'' {{=}} 5}} #{{math|''T'' {{=}} 5 + 11 {{=}} 16}} (adding 11 because {{math|''T''}} is odd) #{{math|''T'' {{=}} {{sfrac|16|2}} {{=}} 8}} #{{math|''T'' {{=}} 8}} (do nothing since {{math|''T''}} is even) #{{math|''T'' {{=}} 7 β (8 mod 7) {{=}} 7 β 1 {{=}} 6}} #Doomsday for 2005 = 6 + Tuesday = Monday The explicit formula for the odd+11 method is: :<math> 7- \left[\frac{y+11(y\,\bmod 2)}{2} + 11 \left(\frac{y+11(y\,\bmod 2)}{2}\bmod 2\right)\right] \bmod 7</math>. Although this expression looks daunting and complicated, it is actually simple<ref name=Odd11paper /> because of a [[common subexpression]] {{math|{{sfrac|''y'' + 11(''y'' mod 2)|2}}}} that only needs to be calculated once. Anytime adding 11 is needed, subtracting 17 yields equivalent results. While subtracting 17 may seem more difficult to mentally perform than adding 11, there are cases where subtracting 17 is easier, especially when the number is a two-digit number that ends in 7 (such as 17, 27, 37, ..., 77, 87, and 97). === Nakai's Formula === Another method for calculating the Doomsday was proposed by H. Nakai in 2023.<ref>{{Cite journal |last=Nakai |first=Hirofumi |date=2023-06-01 |title=A Simple Formula for Doomsday |url=https://link.springer.com/article/10.1007/s00283-022-10229-3 |journal=The Mathematical Intelligencer |language=en |volume=45 |issue=2 |pages=131β132 |doi=10.1007/s00283-022-10229-3 |issn=1866-7414|doi-access=free }}</ref> As above, let the year number ''n'' be expressed as <math>n=100c+y</math>, where <math>c</math> and <math>y</math> represent the century and the last two digits of the year, respectively. If <math>c_2</math> and <math>y_2</math> denote the remainders when <math>c</math> and <math>y</math> are divided by 4, respectively, then the number representing the day of the week for the Doomsday is given by the remainder <math>5(c_{2}+y_{2}-1)+10y \quad\text{mod}\; (7)</math>. ==== Example ==== (August 7, 1966) The remainder on dividing <math>(c,y)=(19,66)</math> by 4 is <math>(c_2,y_2)=(3,2)</math>, which gives <math>5 \cdot (3+2-1)=20 \equiv 6</math>; 10 times <math>y</math> is <math>10 \cdot 66 = 660 \equiv {2}</math>, so Doomsday for 1966 is <math>6+2=8 \equiv 1</math>, that is, Monday. The difference between 7 and the Doomsday in August (namely 8) is <math>7-8=-1 \equiv 6</math>, so the answer is <math>1+6 = 7 \equiv 0</math>, Sunday.<ref>{{Cite web |last=thatsmaths |date=2023-06-22 |title=A Simple Formula for the Weekday |url=https://thatsmaths.com/2023/06/22/a-simple-formula-for-the-weekday/ |access-date=2025-03-21 |website=ThatsMaths |language=en}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)