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.

A230995 Number of years after which a date can fall on the same day of the week, in the Gregorian calendar.

Original entry on oeis.org

0, 5, 6, 7, 11, 12, 17, 18, 22, 23, 28, 29, 33, 34, 35, 39, 40, 45, 46, 50, 51, 56, 57, 61, 62, 63, 67, 68, 73, 74, 78, 79, 84, 85, 89, 90, 91, 95, 96, 101, 102, 106, 107, 108, 112, 113, 114, 117, 118, 119, 123, 124, 125, 129, 130, 131, 134, 135, 136, 140, 141, 142
Offset: 0

Views

Author

Aswini Vaidyanathan, Nov 02 2013

Keywords

Comments

In the Gregorian calendar, a non-century year is a leap year if and only if it is a multiple of 4 and a century year is a leap year if and only if it is a multiple of 400.
Assuming this fact, this sequence is periodic with a period of 400.

Examples

			5 belongs to this sequence because January 1, 2008 falls on same day as January 1, 2013.
6 belongs to this sequence because January 1, 2009 falls on same day as January 1, 2015.
7 belongs to this sequence because January 1, 2097 falls on same day as January 1, 2104.
		

Crossrefs

Cf. A231000 (Julian calendar).

Programs

  • PARI
    for(i=0,400,for(y=0,400,if(((5*(y\4)+(y%4)-(y\100)+(y\400))%7)==((5*((y+i)\4)+((y+i)%4)-((y+i)\100)+((y+i)\400))%7),print1(i", ");break)))