OFFSET
0,2
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
PROG
(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)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jun 03 2001
STATUS
approved