login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008685 Lengths of months in the Gregorian calendar. 9
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, 31, 28, 31 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

To make the definition unambiguous, consider these as starting from January 2001 (or, equivalently, AD 1 in the proleptic Gregorian calendar). [Charles R Greathouse IV, Sep 28 2011]

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

Index entries for sequences related to calendars

Index entries for linear recurrences with constant coefficients, order 4800.

FORMULA

a(n) = a(n-4800). [Charles R Greathouse IV, Sep 28 2011]

MATHEMATICA

year1 = 2001; year2 = 2100;

PreviousDate[#, "Day"][[1, 3]]& /@ Flatten[Table[{#, m, 1}, {m, Append[ Range[2, 12], 1]}]& /@ Range[year1, year2], 1] (* Jean-François Alcover, Aug 01 2018 *)

PROG

(PARI) v=[]; for(n=1, 50, v=concat(v, [31, if(n%4||(n%100==0&&n%400), 28, 29), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31])); v

(Haskell)

a008685 n = a008685_list !! (n-1)

a008685_list = concatMap t [1..] where

   t y = [31, 28 + leap, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

         where leap = if mod y 4 == 0 &&

                         (mod y 100 > 0 || mod y 400 == 0) then 1 else 0

-- Reinhard Zumkeller, Jun 19 2015

CROSSREFS

Cf. A061251.

Sequence in context: A340744 A291471 A276992 * A162156 A141529 A022987

Adjacent sequences:  A008682 A008683 A008684 * A008686 A008687 A008688

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane.

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 30 19:02 EST 2021. Contains 349424 sequences. (Running on oeis4.)