login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A061251 Days in year to end of n-th month starting Jan 01 in a year just following a leap year or millennium. 7

%I #14 Sep 27 2019 22:57:18

%S 0,31,59,90,120,151,181,212,243,273,304,334,365,396,424,455,485,516,

%T 546,577,608,638,669,699,730,761,789,820,850,881,911,942,973,1003,

%U 1034,1064,1095,1126,1155,1186,1216,1247,1277,1308,1339,1369,1400,1430,1461

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

%C y1=2001 y2=2004 in the PARI code.

%C 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

%o (PARI)

%o dom(y1,y2) = /* days of the year */

%o { local(x,y,m,s=0);

%o m=ml=vector(12);

%o m=[31,28,31,30,31,30,31,31,30,31,30,31]; /* days of month */

%o /* May be leap year if year div by 4: */

%o for(y=y1,y2, for(x=1,12, s+=m[x]; if(x==2, if(y%4==0,s++);

%o /* Adjust if century mod(4)<>0: */

%o if(floor(y/100)%4 & y%100==0,s--);

%o );

%o print1(s",") ) ) }

%o (_Cino Hilliard_, Mar 29 2005)

%Y Partial sums of A008685.

%K nonn

%O 0,2

%A _N. J. A. Sloane_, Jun 03 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 22 19:22 EDT 2024. Contains 371906 sequences. (Running on oeis4.)