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!)
A188528 First month in year n with a "Friday the 13th", starting from 1901. 3
9, 6, 2, 5, 1, 4, 9, 3, 8, 5, 1, 9, 6, 2, 8, 10, 4, 9, 6, 2, 5, 1, 4, 6, 2, 8, 5, 1, 9, 6, 2, 5, 1, 4, 9, 3, 8, 5, 1, 9, 6, 2, 8, 10, 4, 9, 6, 2, 5, 1, 4, 6, 2, 8, 5, 1, 9, 6, 2, 5, 1, 4, 9, 3, 8, 5, 1, 9, 6, 2, 8, 10, 4, 9, 6, 2, 5, 1, 4, 6, 2, 8, 5, 1, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
1901,1
COMMENTS
A101312(n) > 0, therefore a(n) is defined for all n.
REFERENCES
Chr. Zeller, Kalender-Formeln, Acta mathematica, 9 (1886), 131-136.
LINKS
Eric Weisstein's World of Mathematics, Triskaidekaphobia
EXAMPLE
Number of times all months occur on "Friday the 13th" in the past century and the current one:
| Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
----------+------------------------------------------------
1991-2000 | 14 14 4 10 14 14 0 11 15 4 0 0
2000-2100 | 14 15 3 11 14 15 0 11 14 3 0 0
The table doesn't say that there are no "Friday the 13ths" in July, November, and December: just first occurrences are considered, e.g. Nov 13 2009 is on a Friday, but a(2009) = 2; Jul 13 2012 is on a Friday, but a(2012) = 1; and Dec 13 2024 is on a Friday, but a(2024) = 9.
MATHEMATICA
{* First execute *) << Calendar`; (* then execute *) Table[Select[ Table[ {yr, n, 13}, {n, 12}], DayOfWeek[#]==Friday&, 1][[1, 2]], {yr, 1901, 2011}] (* Harvey P. Dale, Oct 26 2011 *)
PROG
(Haskell)
import Data.List (findIndex)
import Data.Maybe (fromJust)
a188528 n = succ $ fromJust $
findIndex (\m -> h n m 13 == 6) [1..12] where
h year month day -- cf. Zeller reference.
| month <= 2 = h (year - 1) (month + 12) day
| otherwise = (day + 26 * (month + 1) `div` 10 + y + y `div` 4
+ century `div` 4 - 2 * century) `mod` 7
where (century, y) = divMod year 100
b188528 = bFileFun "A188528" a188528 1991 3000
-- For statistics (see example) ...
ff13_perMonth ys m = length $ filter (== m) (map a188528 ys)
century20 = map (ff13_perMonth [1901..2000]) [1..12]
century21 = map (ff13_perMonth [2001..2100]) [1..12]
(Python)
from datetime import date
def a(n):
for month in range(1, 13):
if date.isoweekday(date(n, month, 13)) == 5: return month
print([a(n) for n in range(1901, 1986)]) # Michael S. Branicky, Sep 06 2021
CROSSREFS
Sequence in context: A335563 A011219 A202543 * A243257 A194182 A019961
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 16 2011
STATUS
approved

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 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)