OFFSET
1,2
COMMENTS
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.
LINKS
EXAMPLE
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.
PROG
(BASIC)
a(0)=13
for n=1 to 400
if (n mod 4 =0 and n mod 100 <>0) or n mod 400 =0 then
a(n)=a(n-1)+8 : if a(n)>14 then a(n)=a(n)-7
else
if (n-1 mod 4 =0 and n-1 mod 100 <>0) or n-1 mod 400 =0 then
a(n)=a(n-1)-5
else
a(n)=a(n-1)+1
end if
if a(n)>7 then a(n)=a(n)-7
end if
next n
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Ian Duff, Mar 30 2007
STATUS
approved
