Thirteen is the sixth prime, a Fibonacci number, and the sum of the squares 4 and 9. It is also the most famous unlucky number in the Western world, and that reputation is far younger than almost everyone assumes.
There is no good evidence of a widespread fear of thirteen before the modern period. The word triskaidekaphobia was coined only in 1911. The two explanations most often given are both later rationalisations. The first is the Last Supper, thirteen at table with the betrayer among them; the superstition about thirteen dining together is attested in the eighteenth century and the scriptural justification appears alongside it rather than before it. The second is Loki arriving as the thirteenth guest at a feast in Valhalla and bringing about the death of Baldr. That story is not in the Poetic or Prose Edda in that form. The thirteenth-guest detail is a nineteenth-century embellishment, and it circulates now as though it were Norse.
Friday the thirteenth is younger still. Fridays were unlucky and thirteen was unlucky, but the combination is not attested before the nineteenth century, and it was pushed into general awareness by Thomas W. Lawson's novel Friday, the Thirteenth in 1907, about a broker who exploits the superstition to crash the market. The explanation that it commemorates the arrest of the Knights Templar on Friday 13 October 1307 is a twentieth-century invention that appears in no earlier source and should be treated as false rather than merely doubtful.
What is genuinely old is the discomfort of a number that follows a very useful one. Twelve organises the year, the circle and the trading systems; thirteen is what is left over, and its unluckiness is best understood as the unluckiness of the remainder.