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.

A178055 Numbers representing the number of days in a month in the Gregorian calendar (modulus 7).

Original entry on oeis.org

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

Views

Author

Lyle P. Blosser (lyleblosser(AT)att.net), May 18 2010

Keywords

Comments

Sequence first term represents January 2000. Sequence repeats after 4800 terms, representing 400 years in the Gregorian calendar system.
Actual number of days in a month can be determined by adding 28 to the value of the sequence term representing the month in question.

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).
		

Crossrefs

Cf. A178054. If a(n) is the n-th term in A178054 and b(n) is the n-th term in A178055, then a(n) + b(n) (modulus 7) = a(n+1)

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 *)