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.

A061251 Days in year to end of n-th month starting Jan 01 in a year just following a leap year or millennium.

Original entry on oeis.org

0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365, 396, 424, 455, 485, 516, 546, 577, 608, 638, 669, 699, 730, 761, 789, 820, 850, 881, 911, 942, 973, 1003, 1034, 1064, 1095, 1126, 1155, 1186, 1216, 1247, 1277, 1308, 1339, 1369, 1400, 1430, 1461
Offset: 0

Views

Author

N. J. A. Sloane, Jun 03 2001

Keywords

Comments

y1=2001 y2=2004 in the PARI code.
In order to define this infinite sequence uniquely one has to fix a starting year. From the given entries this could be any year lying three years before a leap year. In accordance with A008685 let's start with Jan 01 2001, three years before 2004 (following the leap year 2000). - Wolfdieter Lang, May 04 2011

Crossrefs

Partial sums of A008685.

Programs

  • PARI
    dom(y1,y2) = /* days of the year */
    { local(x,y,m,s=0);
      m=ml=vector(12);
      m=[31,28,31,30,31,30,31,31,30,31,30,31]; /* days of month */
      /* May be leap year if year div by 4: */
      for(y=y1,y2, for(x=1,12, s+=m[x]; if(x==2, if(y%4==0,s++);
      /* Adjust if century mod(4)<>0: */
      if(floor(y/100)%4 & y%100==0,s--);
    );
    print1(s",") ) ) }
    \\ Cino Hilliard, Mar 29 2005