A116369 Day of the week corresponding to Jan 01 of a given year (n=0 for the year 2000).
7, 2, 3, 4, 5, 7, 1, 2, 3, 5, 6, 7, 1, 3, 4, 5, 6, 1, 2, 3, 4, 6, 7, 1, 2, 4, 5, 6, 7, 2, 3, 4, 5, 7, 1, 2, 3, 5, 6, 7, 1, 3, 4, 5, 6, 1, 2, 3, 4, 6, 7, 1, 2, 4, 5, 6, 7, 2, 3, 4, 5, 7, 1, 2, 3, 5, 6, 7, 1, 3, 4, 5, 6, 1, 2, 3, 4, 6, 7, 1, 2, 4, 5, 6, 7, 2, 3, 4, 5, 7, 1, 2, 3, 5, 6, 7, 1, 3, 4, 5, 6, 7, 1, 2, 3
Offset: 0
Keywords
Examples
a(6) = 1 because Jan 01 2006 was a Sunday.
References
- N. Dershowitz and E. M. Reingold, Calendrical Calculations, Cambridge University Press, 1997.
Links
- N. Dershowitz and E. M. Reingold, Calendrical Calculations Web Site
- PandaWave Company, World Calendars
- E. G. Richards, Mapping Time, The Calendar and its History, Oxford University Press, Great Clarendon Street, Oxford OX2 6DP, Reprinted 1999 (with corrections) page 231-5, 290, 311, 321.
- Index entries for sequences related to calendars
Programs
-
Mathematica
(* first do *) Needs["Miscellaneous`Calendar`"] (* then *) Table[DayOfWeek[{2000 + n, 1, 1}], {n, 0, 104}] /. {Sunday -> 1, Monday -> 2, Tuesday -> 3, Wednesday -> 4, Thursday -> 5, Friday -> 6, Saturday -> 7} (* Robert G. Wilson v, Apr 04 2006 *)
-
Python
from datetime import date def a(n): return (date(2000+n, 1, 1).isoweekday())%7 + 1 print([a(n) for n in range(105)]) # Michael S. Branicky, Jan 05 2021
Formula
1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday and 7 = Saturday. a(n+400) = a(n) since the cycle repeats every 400 years.
Extensions
More terms from Robert G. Wilson v, Apr 04 2006
Comments