A178055 Numbers representing the number of days in a month in the Gregorian calendar (modulus 7).
3, 1, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 1, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 1, 3, 2, 3, 2, 3, 3, 2
Offset: 1
Examples
a(1) = 3 -> January 2000 has 31 days (3+28), a(2) = 1 -> February 2000 has 29 days (1+28), a(3) = 3 -> March 2000 has 31 days (3+28).
Links
Crossrefs
Programs
-
Mathematica
dys[{y_,m_,1}]:=If[m==12,DateDifference[{y,m,1},{y+1,1,1}],DateDifference[ {y,m,1},{y,m+1,1}]][[1]]; Mod[#,7]&/@(dys/@ Flatten[Table[{y,m,1},{y,2000,2010},{m,12}],1]) (* Harvey P. Dale, Sep 04 2020 *)
Comments