Archive for superstition

how many Friday 13th?

Posted in Books, Kids, R with tags , , , on December 18, 2020 by xi'an

A short Riddler’s riddle on the maximum number of Fridays 13th over a calendar year, of which I found 9 by a dumb exploration :


bi=c(1:31,1:29,1:31,1:30,1:31,1:30,1:31,1:31,1:30,1:31,1:30,1:31)
oy=bi[-60]
for(j in 0:(length(cy<-c(bi,oy,oy,oy))-1)){#any day in quartade
dy=c(cy[(j+1):length(cy)],cy[1:j])
for(i in 0:6){
dz=(i+(1:length(cy)))%%7
if((k<-sum((dz==5)*(cy==13)))>9)print(c(i,j,k))}}

with no change whatsoever when starting another day of the year, including a Friday 13.(since this only gains 13 days!). An example of a quartade (!) with nine such days is the sequence 2012-2015 with 3+2+1+3 occurences….

Sepulchre marathon winner’s foot

Posted in Statistics with tags , , , , , , , , on May 25, 2019 by xi'an