A very modern phenomenon. Thirteen was a lucky number in medieval times. Friday the 13th seems to be a Victorian contrivance, perhaps based on the notion the Judas was the the 13th disciple, combined with the fact that Friday has always been considered an unlucky day.