login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Duration in months between successive instances of a given Julian calendar day of the month falling on a specified day of the week.
0

%I #35 Jul 10 2017 04:25:32

%S 3,3,14,3,6,8,1,8,6,8,9,6,3,14,3,3,8,9,9,8,9,11,3,6,8,1,8,9,14,6,3,14,

%T 3,6,8,6,9,8,9,6,3,11,8,1,8,9,9,8

%N Duration in months between successive instances of a given Julian calendar day of the month falling on a specified day of the week.

%C A 28-year cycle exists as derived by multiplication of 4 years / leap cycle by 7 days of the week. Within such a cycle there are exactly 48 days when a given day of the month (selected from 1 to 28) falls on a specific day of the week.

%C Fewer days result for the choices of 29, 30 and 31, each with their own unique sequence that repeats after 28 years. These results may be published as their own related yet nonetheless unique sequences.

%C The average duration between such events is simply 7 months as trivially derived. However, the *actual* durations vary from 1 to 14 months with the following frequencies:

%C separation (months) number of instances

%C 1 3

%C 3 10

%C 6 8

%C 8 12 (modal value)

%C 9 9

%C 11 2

%C 14 4

%C The entire sequence of 48 time separations in months between successive instances of a given day of the month falling on a specified day of the week is provided above.

%C (Account is not taken of the extra non-leap years introduced with the Gregorian calendar; i.e., those divisible by 100 yet NOT by 400, e.g., A.D. 2100, 2200 and 2300. Thus, the method in the example does not work without modification for time durations including such years or years such as A.D. 2201, 2202 or 2203; in these cases, the previous leap year is 4, 5, 6 or 7 years earlier.)

%H <a href="/index/Ca#calendar">Index entries for sequences related to calendars</a>

%F Brute force calculation is more efficient than employing a formula, one that would be most involved and hence not meaningful in its individual terms. Calendar consultation provides a simple alternative.

%e **** THIS FULL EXPLANATION IS REQUIRED TO PROVIDE AN EXAMPLE ****

%e Designate "year 0" as any leap year, with the succeeding years as years 1, 2 and 3. The first term, 3, is the time in months between a date in January 0 (such as January 17, 2012 - a leap year) and the next time ANY "17th" falls on the same day of the week - April 17, 2012.

%e The following tabulation identifies the remaining 47 month/year combinations within the sequence, with "year" being 0 through 3 as defined above.

%e Jan0- 3 -Apr0- 3 -Jul0- 14 -Sep1- 3 -Dec1- 6 -Jun2- 8 -Feb3

%e Feb3- 1 -Mar3- 8 -Nov3- 6 -May0- 8 -Jan1- 9 -Oct1- 6 -Apr2

%e Apr2- 3 -Jul2- 14 -Sep3- 3 -Dec3- 3 -Mar0- 8 -Nov0- 9 -Aug1

%e Aug1- 9 -May2- 8 -Jan3- 9 -Oct3- 11 -Sep0- 3 -Dec0- 6 -Jun1

%e Jun1- 8 -Feb2- 1 -Mar2- 8 -Nov2- 9 -Aug3- 14 -Oct0- 6 -Apr1

%e Apr1- 3 -Jul1- 14 -Sep2- 3 -Dec2- 6 -Jun3- 8 -Feb0- 6 -Aug0

%e Aug0- 9 -May1- 8 -Jan2- 9 -Oct2- 6 -Apr3- 3 -Jul3- 11 -Jun0

%e Jun0- 8 -Feb1- 1 -Mar1- 8 -Nov1- 9 -Aug2- 9 -May3- 8 -Jan0

%e **** EXAMPLE ****

%e It is December 13, 2013 - and a Friday. When are the next 5 "Friday the 13ths"?

%e SOLUTION. 2013 is a "year 1". Locate December for year 1 in the table in the fifth column of months, first entry. By inspection it is 6 months to the next Friday the 13th in June 2014. Reading the next four entries, the remaining four events are in February 2015 (as "Feb3"), March 2015 ("Mar3"), November 2015 ("Nov3") and May 2016 ("May0").

%o (PARI)

%o {a(n, list = 0) = if(n<1 || n>48, return);

%o \\ calculate (\list) up to n-th term

%o my(daysmod7 = [3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3],

%o \\ days beyond 28 in months

%o s = 0, c = 1, yr = 0, mo = 1, months = 0);

%o \\ yr = 0 means (Julian) leap year

%o while(1, \\ find next cumulative whole week(s)

%o months++; s = (s + daysmod7[mo] + (mo==2 && yr==0))%7;

%o \\ count elapsed months

%o if(s==0, if(list, print1(months, ", "));

%o \\ print if optional list <> 0

%o if(c==n, return(months), c++; months = 0));

%o \\ return n-th or continue

%o if(mo<12, mo++, mo = 1; yr = (yr + 1)%4))}

%o \\ new month or new month/year

%o a(48, 1) \\ print all 48 terms (and return 48th) - _Rick L. Shepherd_, Jul 06 2017

%Y Cf. A231010, A231013.

%K nonn,fini,full

%O 1,1

%A _Adam Helman_, Dec 14 2013

%E Lightly edited and terms/examples checked by _Rick L. Shepherd_, Jun 29 2017