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.
%I A127376 #16 Feb 08 2025 20:38:10 %S A127376 1,2,3,11,6,7,1,9,4,5,6,14,2,3,4,12,7,1,2,10,5,6,7,8,3,4,5,13,1,2,3, %T A127376 11,6,7,1,9,4,5,6,14,2,3,4,12,7,1,2,10,5,6,7,8,3,4,5,13,1,2,3,11,6,7, %U A127376 1,9,4,5,6,14,2,3,4,12,7,1,2,10,5,6,7,8,3,4,5,13,1,2,3,11,6,7,1,9,4,5,6,14,2 %N A127376 Perpetual calendar, giving the calendar for successive years of the 400-year cycle starting in year xy01, where xy is a 2-digit multiple of 4. Calendars 1 to 7 are for normal years starting on Monday, Tuesday, ..., Sunday; 8 to 14 are for leap years likewise. %C A127376 A090651 gives the 14-year repeating cycle applying between century years not a multiple of 400; this sequence extends that to the complete 400-year cycle. %H A127376 Ian Duff, <a href="/A127376/b127376.txt">Table of n, a(n) for n = 1..400</a> %H A127376 <a href="/index/Ca#calendar">Index entries for sequences related to calendars</a> %H A127376 <a href="/index/Rec#order_400">Index entries for linear recurrences with constant coefficients</a>, order 400. %e A127376 2001 is an ordinary year starting on a Monday, as a(1)=1; 2004 is a leap year starting on a Thursday, as a(4)=11; 2400 is a leap year starting on Saturday, as a(400)=13. %o A127376 (BASIC) %o A127376 a(0)=13 %o A127376 for n=1 to 400 %o A127376 if (n mod 4 =0 and n mod 100 <>0) or n mod 400 =0 then %o A127376 a(n)=a(n-1)+8 : if a(n)>14 then a(n)=a(n)-7 %o A127376 else %o A127376 if (n-1 mod 4 =0 and n-1 mod 100 <>0) or n-1 mod 400 =0 then %o A127376 a(n)=a(n-1)-5 %o A127376 else %o A127376 a(n)=a(n-1)+1 %o A127376 end if %o A127376 if a(n)>7 then a(n)=a(n)-7 %o A127376 end if %o A127376 next n %Y A127376 Cf. A090651. %K A127376 easy,nonn %O A127376 1,2 %A A127376 _Ian Duff_, Mar 30 2007