This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A188528 #34 Feb 16 2025 08:33:14 %S A188528 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, %T A188528 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, %U A188528 6,2,8,10,4,9,6,2,5,1,4,6,2,8,5,1,9 %N A188528 First month in year n with a "Friday the 13th", starting from 1901. %C A188528 A101312(n) > 0, therefore a(n) is defined for all n. %D A188528 Chr. Zeller, Kalender-Formeln, Acta mathematica, 9 (1886), 131-136. %H A188528 Reinhard Zumkeller, <a href="/A188528/b188528.txt">Table of n, a(n) for n = 1901..3000</a> %H A188528 J. R. Stockton, <a href="https://web.archive.org/web/20140111181708/http://www.merlyn.demon.co.uk/zel-86px.htm">Rektor Chr. Zeller's 1886 Paper "Kalender-Formeln"</a> %H A188528 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Triskaidekaphobia.html">Triskaidekaphobia</a> %H A188528 Wikipedia, <a href="http://en.wikipedia.org/wiki/Triskaidekaphobia">Triskaidekaphobia</a> %H A188528 <a href="/index/Ca#calendar">Index entries for sequences related to calendars</a> %e A188528 Number of times all months occur on "Friday the 13th" in the past century and the current one: %e A188528 | Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec %e A188528 ----------+------------------------------------------------ %e A188528 1991-2000 | 14 14 4 10 14 14 0 11 15 4 0 0 %e A188528 2000-2100 | 14 15 3 11 14 15 0 11 14 3 0 0 %e A188528 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. %t A188528 << Calendar`; %t A188528 Table[Select[ Table[ {yr,n,13},{n,12}],DayOfWeek[#]==Friday&,1][[1,2]],{yr,1901,2011}] (* _Harvey P. Dale_, Oct 26 2011 *) %o A188528 (Haskell) %o A188528 import Data.List (findIndex) %o A188528 import Data.Maybe (fromJust) %o A188528 a188528 n = succ $ fromJust $ %o A188528 findIndex (\m -> h n m 13 == 6) [1..12] where %o A188528 h year month day -- cf. Zeller reference. %o A188528 | month <= 2 = h (year - 1) (month + 12) day %o A188528 | otherwise = (day + 26 * (month + 1) `div` 10 + y + y `div` 4 %o A188528 + century `div` 4 - 2 * century) `mod` 7 %o A188528 where (century, y) = divMod year 100 %o A188528 b188528 = bFileFun "A188528" a188528 1991 3000 %o A188528 -- For statistics (see example) ... %o A188528 ff13_perMonth ys m = length $ filter (== m) (map a188528 ys) %o A188528 century20 = map (ff13_perMonth [1901..2000]) [1..12] %o A188528 century21 = map (ff13_perMonth [2001..2100]) [1..12] %o A188528 (Python) %o A188528 from datetime import date %o A188528 def a(n): %o A188528 for month in range(1, 13): %o A188528 if date.isoweekday(date(n, month, 13)) == 5: return month %o A188528 print([a(n) for n in range(1901, 1986)]) # _Michael S. Branicky_, Sep 06 2021 %Y A188528 Cf. A101312, A157962. %K A188528 nonn %O A188528 1901,1 %A A188528 _Reinhard Zumkeller_, May 16 2011