cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A119406 Years in which there are five Sundays in the month of February.

This page as a plain text file.
%I A119406 #24 Jul 26 2023 20:25:42
%S A119406 1756,1784,1824,1852,1880,1920,1948,1976,2004,2032,2060,2088,2128,
%T A119406 2156,2184,2224,2252,2280,2320,2348,2376,2404,2432,2460,2488,2528,
%U A119406 2556,2584,2624,2652,2680,2720,2748,2776,2804,2832,2860,2888,2928,2956,2984,3024
%N A119406 Years in which there are five Sundays in the month of February.
%C A119406 "The Gregorian calendar has been in use in the Western world since 1582 by Roman Catholic countries and since 1752 by English speaking countries. The Gregorian calendar counts leap years every year divisible by 4, except for centuries not divisible by 400, which are not leap years." - The Mathematica Book
%C A119406 Because the days of the week of the Gregorian calendar repeat every 400 years, the first differences of this sequence have period 13: [28, 40, 28, 28, 40, 28, 28, 28, 28, 28, 28, 40, 28]. - _Nathaniel Johnston_, May 30 2011
%D A119406 George G. Szpiro, The Secret Life Of Numbers, 50 Easy Pieces On How Mathematicians Work And Think, Joseph Henry Press, Washington, D.C., 2006, Chapter 1, "Lopping Leap Years", pages 3-5.
%H A119406 TimeAndDate.com, <a href="http://www.timeanddate.com/calendar/">A calendar website</a>
%H A119406 <a href="/index/Ca#calendar">Index entries for sequences related to calendars</a>
%H A119406 <a href="/index/Rec#order_14">Index entries for linear recurrences with constant coefficients</a>, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1).
%p A119406 A119406 := proc(n) local s: s:=[0, 28, 68, 96, 124, 164, 192, 220, 248, 276, 304, 332, 372]: return 1756 + 400*floor((n-1)/13) + s[((n-1) mod 13) + 1]: end: seq(A119406(n),n=1..42); # _Nathaniel Johnston_, May 30 2011
%t A119406 (* first do *) Needs["Miscellaneous`Calendar`"] (* then *) fQ[y_] := Mod[y, 4] == 0 && Mod[y, 400] ? 0 && DayOfWeek[{y, 2, 1}] == Sunday; Select[ Range[1582, 3051], fQ@# &]
%t A119406 (* Second program, needing Mma version >= 9.0 *)
%t A119406 okQ[y_] := Mod[y, 4] == 0 && DayCount[{y, 1, 31}, DatePlus[{y, 3, 1}, -1], Sunday] == 5;
%t A119406 Select[Range[1752, 3051, 4], okQ] (* _Jean-François Alcover_, Mar 27 2020 *)
%Y A119406 Cf. A008685, A011763, A011770.
%Y A119406 Cf. A135795 (Mon), A143994 (Tue), A141039 (Wed), A143995 (Thu), A141287 (Fri), A176478 (Sat).
%K A119406 nonn,easy
%O A119406 1,1
%A A119406 George G. Szpiro (george(AT)netvision.net.il) and _Robert G. Wilson v_, Jul 05 2006