From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11390f,be6b7e036aa9236c X-Google-Attributes: gid11390f,public X-Google-Thread: 1014db,be6b7e036aa9236c X-Google-Attributes: gid1014db,public X-Google-Thread: fa0ae,be6b7e036aa9236c X-Google-Attributes: gidfa0ae,public X-Google-Thread: 10261c,68666e29d0425009,start X-Google-Attributes: gid10261c,public X-Google-Thread: 114809,68666e29d0425009,start X-Google-Attributes: gid114809,public X-Google-Thread: 1164ba,be6b7e036aa9236c X-Google-Attributes: gid1164ba,public X-Google-Thread: 1094ba,be6b7e036aa9236c X-Google-Attributes: gid1094ba,public X-Google-Thread: 103376,be6b7e036aa9236c X-Google-Attributes: gid103376,public From: Lee Crites Subject: Results of my test: Re: Friday 13th, try it yourself Date: 1996/09/25 Message-ID: X-Deja-AN: 185329629 references: <52bmft$f3l@news1.halcyon.com> content-type: TEXT/PLAIN; charset=US-ASCII organization: Jump Point Communications, Inc. mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.apl,comp.lang.basic,comp.lang.c,comp.lang.fortran,comp.lang.perl.misc,comp.lang.pascal.misc,comp.lang.smalltalk Date: 1996-09-25T00:00:00+00:00 List-Id: For the most part, I've ignored this friday the 13th thread. However, something someone said got my interest. Basically the statement was that the same date 400 years later would fall on the same day. I thought I'd check it out and see. Unfortunately, it did not work on the dates I checked. There was also another comment about having to stay after 1752. So I decided I could toss together a quick csh script to call cal for 400 years, strip out the Fridays, and use awk to summarize them into which date happened most often -- if, in fact, any happened more often than another. I *assume* the cal utility takes all of the funky leap-year triviality into consideration. If it doesn't, then my results are skewed. I'm using the assumption, though, that aix 4.1, which I have been told has had the 'year 2000' fix applied, would have a 'good' version of cal. In keeping with the 'show us your source' mindset, here's mine. I've tested this on a sun and an rs. What I'm including is the rs/aix 4.1 version and output. This is the csh script that ran it all (No flames about me using csh will be accepted; If you don't like csh, that's fine with me, please keep it to yourself): #!/bin/csh -f # # get friday dates for 400 years # if (-e f13.out) then rm f13.out endif @ yr_base = 1752 # from Ken Pizzini @ yr = 0 while ( $yr < 400 ) @ yr ++ @ year = $yr_base + $yr echo $year # # use cal to give me a calendar of the month in question, then # use cut to give me just the Fridays, tail to strip out the # cal header stuff, and awk to make sure we have valid numbers # @ month = 0 while ( $month < 12 ) @ month ++ cal $month $year | \ tail +2 | \ cut -c21-22 | \ awk '{x=int($0);if(x>0)print x}' >> f13.out end end awk -f f13.awk f13.out > f13.rpt cat f13.rpt Just because it's there, here is a list of the first 20 entries in the f13.out file (there were 20871 Fridays listed): 5 12 19 26 2 9 16 23 2 9 16 23 30 6 13 20 27 4 11 18 This is the awk file used above: BEGIN { cnt = 0 x = 0 for (x=1; x<32; x++) { dist[x] = 0 } } { dist[$0]++ cnt++ } END { if (cnt==0) { printf("No values found\n") } else { printf("Summary of Friday dates for 400 years:\n") for (x=1; x<32; x++) { if (dist[x] > 0) { printf("%10d found %4d times\n", x, dist[x]) } } } } And finally, here are the results of the run: Summary of Friday dates for 400 years: 1 found 687 times 2 found 685 times 3 found 685 times 4 found 687 times 5 found 684 times 6 found 688 times 7 found 684 times 8 found 687 times 9 found 685 times 10 found 685 times 11 found 687 times 12 found 684 times 13 found 688 times 14 found 684 times 15 found 687 times 16 found 685 times 17 found 685 times 18 found 687 times 19 found 684 times 20 found 688 times 21 found 684 times 22 found 687 times 23 found 685 times 24 found 685 times 25 found 687 times 26 found 684 times 27 found 688 times 28 found 684 times 29 found 643 times 30 found 629 times 31 found 399 times If I'd made a wild guess of what the results would have been before I started, I'd have come up with something similar to the above. Uniform distribution across all dates -- with diminished numbers from the 29th through 31st. Realizing these results would not make the it's-not-uniform-distribution group happy, I ran it again based upon 1800 instead of 1753, with exactly the same results. Since there will be those who want to analyze the cal functionality, I've included the January calendar for the start of each decade from 1760 through 2150 at the end of this message. Knock yourself out... I'm not stupid enough to believe this will settle the discussion concerning the statistical nature of our calendar, but at least it's something more concrete to work with. And, as it is, I am satisfied with the results. Lee Crites Systems Consultant Computer Mavericks adonai@jump.net January 1760 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1770 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1780 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1790 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1800 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1810 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1820 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1830 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1840 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1850 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1860 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1870 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1880 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1890 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1900 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1910 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1920 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1930 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1940 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1950 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1960 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1970 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1980 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 1990 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2000 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2010 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2020 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2030 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2040 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2050 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2060 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2070 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2080 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2090 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2100 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2110 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2120 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2130 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2140 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 January 2150 Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31