Skip to content

Project Euler 19 Mystery Cache

Hidden : 1/18/2017
Difficulty:
2 out of 5
Terrain:
1.5 out of 5

Size: Size:   micro (micro)

Join now to view geocache location details. It's free!

Watch

How Geocaching Works

Related Web Page

Please note Use of geocaching.com services is subject to the terms and conditions in our disclaimer.

Geocache Description:

Acknowledgements


This cache was inspired by Project Euler.

General notes


  • To solve Project Euler puzzles, you will probably have to write a computer program.
  • Many of the containers are small, and contain neither pen nor pencil.
  • There are explicit finding notes in each geochecker.

Counting Sundays, Mondays, …


Thirty days has September,
April, June and November.
All the rest have thirty-one,
Saving February alone,
Which has twenty-eight, rain or shine.
And on leap years, twenty-nine.

You are also told that 1 Jan 1900 was a Monday, and that a leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.

Taken together this means that there are 146,097 days in 400 years, which corresponds to exactly 20,871 weeks. This result implies that the calendar repeats after 400 years, so 1 Jan 2300 will be a Monday too.


The Puzzle


Solving this puzzle involves counting how often things fall on particular days of the week during one 400 year cycle. Specifically let's introduce the following counts:

a(d) The 31st of a month falls on day d.
b(d) The 13th of a month falls on day d.
c(d) Euler's birthday falls on day d.
e(d) The 29th of February falls on day d.
f(d) The 30th of a month falls on day d.

For example, you will find that c(Fri) = 58, which means that of the 400 birthdays Euler would have enjoyed had he lived between 1900 and 2300, 58 of them fall on a Friday.


To find the cache calculate:

a(Sat) * (b(Fri) - b(Sat)) * (c(Sat) * c(Mon) + c(Sun)),

and,

e(Mon) * a(Fri) + f(Tue).


Additional Hints (Decrypt)

Frr gur trbpurpxre.

Decryption Key

A|B|C|D|E|F|G|H|I|J|K|L|M
-------------------------
N|O|P|Q|R|S|T|U|V|W|X|Y|Z

(letter above equals below, and vice versa)