Enigmatic Code

Programming Enigma Puzzles

Enigma 532: Friday the 13th

From New Scientist #1684, 30th September 1989 [link]

John Thomas, who is 50 this year [i.e. in 1989], was not really superstitious till Betty left him. In fact, they were engaged on a Friday the 13th. They were married after 13 weeks of courtship on a Friday the 13th. The married couple were abroad for their Christmas vacation. Towards the end of that vacation they quarrelled and disagreed on almost everything. They were eventually separated on a Friday the 13th, after exactly 13 weeks of married life. These events made John very, very superstitious.

When did Betty leave John?


2 responses to “Enigma 532: Friday the 13th

  1. Jim Randell 30 December 2019 at 8:39 am

    This Python program looks for suitable dates. It runs in 92ms.

    Run: [ @repl.it ]

    import datetime
    from enigma import printf
    # consider dates from 1939 - 1989
    d = datetime.date(1939, 1, 1)
    i = datetime.timedelta(days=1)
    # collect dates that fall on Friday 13th
    ds = list()
    while d.year < 1990:
      if d.day == 13 and d.isoweekday() == 5:
      d += i
    # look for three dates separated by 13 weeks
    i = datetime.timedelta(weeks=13)
    for d1 in ds:
      d2 = d1 + i
      d3 = d2 + i
      if not(d2 in ds and d3 in ds): continue
      # d2 is before Christmas, and d3 is after it
      if not(d2 < datetime.date(day=25, month=12, year=d2.year) < d3): continue
      printf("engaged = {d1}; married = {d2}; divorced = {d3}")

    Solution: They separated on 13th March 1964.

    The were engaged on 13th September 1963, and married on 13th December 1963.

  2. Hugh Casement 30 December 2019 at 9:51 am

    From the nth of September to the nth of December is 30 + 31 + 30 days = 13 weeks.
    If the following year is a leap year, then it’s 31 + 31 + 29 days to the nth of March.

    The sequence had previously occurred in 1935-36 (before John was born)
    and occurred again in 1991-92 (after the puzzle was set).
    Also 2019-20, but in that case they’re still quarrelling and she hasn’t left him yet.

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: