Digits of e

In the Harvard Square T (subway) station, there are big banners that say:

{ first 10-digit prime found in consecutive digits of e }.com

Various people who've seen it suggested that it was probably a recruiting mechanism for some computer company, and I agreed that that seemed likely. I kept meaning to Google for the answer—figuring someone would've solved it and posted the answer by now, at which point it would stop being a useful problem to screen candidates—but I kept forgetting, until this morning when O. pointed me to Google's page on the subject. Turns out it is indeed a recruiting mechanism, for Google. If you go to the relevant URL, you get a second problem to solve.

The funny thing is, this campaign has been running on billboards on 101 (the main freeway up and down the peninsula in the San Francisco Bay Area) since sometime in July, and people started posting solutions in their blogs shortly thereafter. Which means detailed answers to both puzzles have been available in numerous places online for at least two months now. I imagine true geeks would still try to solve the problem without Googling; I'm just saying that it's no longer necessarily a good way of screening applicants.

I'm also disappointed in the approaches people used to solve the first one; I figured there was some approach that would be more elegant than the brute-force "test all 10-digit sequences in e to see if they're prime" method. (In particular, I had assumed that the company who designed the puzzle would've picked a puzzle that would be hard or slow to brute-force; I figured that the sequence they were looking for probably wouldn't occur in the first ten million digits of e, or something. But it turns out there's a method for producing digits of e—an unbounded spigot algorithm—that apparently makes it relatively straightforward to keep generating digits and doing the brute-force test even if you don't have a lot of digits at hand.)

Marcus Kazmierczak provides the best discussion of solving both problems that I've seen; don't follow that link if you don't want spoilers. (And actually he did use a slightly smarter-than-brute-force approach.)

4 Responses to “Digits of e”

  1. David Moles

    Maybe they’re just looking for people with mad Googling skillz.

    reply
  2. Jenn Reese

    I think they’re looking for people who would consider such an advertising scheme “cool” and/or “fun”, and might be attracted to the company. I don’t think it’s intended to assess skill in any way.

    But who knows? 😀

    reply
  3. Jed

    Yeah, I imagine that both those things (Googling skills and cool/fun factor) are part of their intent, but the page you get to after solving the second problem suggests that they consider anyone who gets to that page to be among the best engineers in the world. I may be misinterpreting it, but it does seem to me that they’re using it as a skill filter.

    I suspect that the first couple hundred people who got to the final page did so by solving the problem themselves, and I do think this is a cool approach to recruiting. I’m just surprised to see it continue this long.

    reply
  4. Michael

    For the first problem: can’t you just get a list of all the domains that are a 10-digit number, then see which ones are prime, then look at those?

    reply

Join the Conversation