Skip to content
This is a simple python program I wrote to solve the 2004 Google Billboard Puzzle after reading about it in order to find the correct solution.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Google 2004 Billboard Puzzle

"Mysterious banners at a Cambridge, Mass., subway stop have commuters scratching their heads. The signs, challenging passers-by to solve a complicated math problem, are actually a cryptic pitch by Google, which is looking to hire more brainy engineers. Andrea Shea reports. The message at Harvard Square also appears on a billboard in California's Silicon Valley, but Google's name is nowhere to be found on the ads. It simply states: {first 10-digit prime found in consecutive digits of e}.com In case you're wondering -- or forgot -- e is the base of the natural system of logarithms, having a numerical value of about 2.71828 (though the number goes on forever). The correct answer to the banner problem leads to a Web site that poses yet another puzzle. Eventually, the determined problem-solver lands at a Google Web page that asks the smart, or lucky, few for a resume" (npr 2004).

About the Program

The program uses two infinite series that converge to e:

#1: The Maclaurin Expansion of f(x) = eˣ |ₓ₌₁: { }

#2: The Brothers Formulae: { }

The program simply calculates both series and conflates the two into one value for a variable e. This makes it so that the program can only search for legitimate digits of e rather than digits that have not been completed in a single infinite series. For instance, when k = 5 for The Maclaurin Expansion of f(x) = eˣ |ₓ₌₁ it will not accurately give the latter digits of e. I do not want to search through these; they could yield a false solution. When the two series have the same digits they are added to said variable e. As e gets larger every time a digit is added a 10 digit number formed at that point is checked for primality. The time compexity of the entire algorithm was not taken into account too much (thanks to the Prime Number Theorem) (luckily we are looking for a 10 digit prime in consecutive digits of e).

From this program I figured out that the answer is: (does not redirect anymore)

Check for yourself by running the program (quickly check by pasting the contents of the .py file here)

Find Me

You can’t perform that action at this time.