Google Billboard Puzzle

In July 2004, Google tried a innovative way of recruiting talented people, by posting a mathematical puzzle on a billboard on 'Highway 101' in the heart of silicon valley. The billboard read:

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

The answer, 7427466391.com, would lead to a Web page with yet another equation to solve, with still no sign of the firm that wanted to recruit some of the best math guys, out there. It wasn't known that it was Google, until the puzzle was cracked.

Here's a pic of that billbaord:



I got to know this puzzle much later and thought of giving it a try. Without thinking much, my first idea was to use a simple, naive, brute-force approach of calculating Euler's Number (e) to around 10000 digits and then loop over the decimal part of 'e', taking 10 digits in each step and incrementing by 1 digit, in each step. I tried it and it worked, without consuming much time.

"Euler's Number" can be calculated in a couple of ways, but I used the following formula:



With the above formula, we can calculate 'e' by looping through, finding factorial and adding up 1/Facorial(n), in each and every loop. Java was my programming language of choice, but calculating e to 10000 digits precision is a problem because you cant use the normal primitives like "double", "float" or whatever to contain the huge number of digits in the decimal part of a number. So, it was pretty obvious that I had to use 'BigDecimal'.

One more tricky part was to determine 'how many times should the program loop through , for the precision to be around 10000 digits'? I tried a couple of combinations and found that "100" would be good enough. Also it doesn't consume much time. If you try it for 10000 or more, it would probably take a couple of minutes or hours.

Ok....I looped through "100" times in the code, calculated 'e' to a bit more than 10000 digits, in the first step. The next step, I looped through the decimal part of 'e', taking 10 char substrings (starting from the decimal point) in each step and checking whether its a prime or not. If it's a prime, the Puzzle is solved!

Here's the Java code for finding the 'First 10 digit prime number in the consecutive digits of e':



I ran this program and got the following output:

First 10 digit prime number in the decimal part of e : 7427466391

So, thats the answer and the domain address would be 7427466391.com" (which is defunct now).

....and here's the "Euler's Number (e)" that I calculated using the above approach: 'e to 10000 digits'


PS: The above solution is a very basic, brute-force/trial-and-error approach that I used, but it very much solves the puzzle.

24 comments:

  1. Wow!!
    (a bit too late for this comment but I just saw about it)

    ReplyDelete
    Replies

    1. FOR YOUR REQUIRED QUICK AFFORDABLE LOAN, EMAIL dawsonlewisloancompany@yahoo.com

      Hello, I am Sandra Alice currently living in New jersey city, USA. I am a widow at the moment with two kids and i was stuck in a financial situation in June 2015 and i needed to refinance and pay my bills. I tried seeking loans from various loan firms both private and corporate but never with success, and most banks declined my credit. But as God would have it, I was introduced to a Man of God a private loan lender who gave me a loan of $105,000USD and today am a business owner and my kids are doing well at the moment, if you must contact any firm with reference to securing a loan without collateral , no credit check, no co signer with just 2% interest rate and better repayment plans and schedule, please contact Mr Dawson Lewis. He doesn’t know that am doing this but am so happy now and i decided to let people know more about him and also i want God to bless him more.You can contact him through his email: (dawsonlewisloancompany@yahoo.com) Or TEL:+14105016847

      Delete
  2. I was born yesterday and seeing it today :D

    ReplyDelete
  3. Just silicon valley? REALLY! Way to go google that's really the only place smart people live eh' LOL! This is an amazing stradegy though. Great blog smartie ;-)

    ReplyDelete
  4. That's Mathematica code :)

    digits = RealDigits[ N[E , 100000]][[1]][[2 ;;]];
    nd[n_] := FromDigits[Take[digits, {n, n + 9}]];
    n = 1; While[n < Length[dd] - 10 && ! PrimeQ[nd[n]], n++]
    nd[n]

    ReplyDelete
  5. All details are mentioned in the contact details of the website. The company is trying to make the decision on the loan application as soon as possible. Meanwhile, the applicant held at the implementation progress was reported. The controlled company detail an applicant for a credit reporting agency in order to ensure the credibility of the borrower and his / her previous records.

    http://6monthtextloansnoguarantor.co.uk
    http://uk6monthloans.co.uk/
    http://www.elongtermpaydayloansuk.co.uk/small-cash-loans-online.html

    ReplyDelete
  6. One of the most misguided values about making an investment in outside advertisements is that it requires a lot of cash to get began. Another misperception is that you need to own the real residence to be able to produce billboard earnings.
    Billboard

    ReplyDelete
  7. good....................
    www.inplanttrainingchennai.com
    www.inplanttraining-in-chennai.com
    www.kaashivinfotech.com
    www.internshipinchennai.in
    www.inplant-training.org
    www.inplanttrainingin-coimbatore.com

    ReplyDelete
  8. Most of the universities and universities and universities create it compulsory for candidates to publish articles on a pre-defined subject. This helps them in the choice oflist of literary tours by topaussiewriters potential students for entrance into their educational institution.

    ReplyDelete
  9. outdoor Media Advertising signs is becoming one of the best ever increasing company areas out of the financial economic downturn due to the quantity of organizations making an investment in this solution

    ReplyDelete
  10. If you are worried about the whereabouts of a person, concerned for their safety or wish to locate a person who is not easy to find, You should take services of a reliable private investigation company in Dallas. To know more about how Investigative Resources of Texas can help you,Call us at (214) 662 1006.

    ReplyDelete
  11. This is such a great blog. you really covered it all. Thank you for sharing such an important information. Hope to get some more information in future also.
    Husband Wife Dispute Specialist
    Career or job Problem Specialist
    Love Vashikaran Specialist in India.
    100% satisfaction guarantee Call @ +91-9815872813.

    Regards,
    Shri Mukesh Aghori Ji

    ReplyDelete
  12. $$$ URGENT LOAN OFFER WITH LOW INTEREST RATE APPLY NOW $$$
    Do you need Loan to pay off your debt and start a new life? You have come to the right place were you can get FUNDED at a very low interest rate. Interested people/company should please contact us via email for more details.

    Full name:
    Date of birth (yyyy-mm-dd):
    Gender:
    Marital status:
    Amount Needed:
    Duration:
    Address:
    City:
    State/province:
    Zip/postal code:
    Country:
    Phone number:
    Monthly Income:
    Occupation:

    E-mail: shadiraaliuloancompany1@gmail.com

    ReplyDelete
  13. I could not believe how you solved this problem. Wow!

    chandlercompany.com

    ReplyDelete
  14. nice explanation it cool to watch more Google Puzzle on Youtube like that https://www.youtube.com/watch?v=r4uoO4cBLFs

    ReplyDelete
  15. Hello Every One,

    Need legitimate and quick loan service? Apply For Further Procedure. We Offer All Kinds Of Loans At 4% Annual Interest Rate From The Ranges Of 1000 to 50 million. Any Interested Person Should Reply Back To Us With The Following: Email: morganwilliamloanfirm200@hotmail.com

    Info needed, please contact us.

    Full name: ........
    Telephone number:...
    Monthly income: ....
    Country .......
    Loan Purpose .......
    The amount needed ........
    Loan Status / Duration: ..

    Contact us by email: morganwilliamloanfirm200@hotmail.com
    Credit announcer,
    financial company
    Contact the credit Speedy now !!!

    ReplyDelete
  16. My name is Monica Roland. I live in United Kingdom Manchester City and i am a happy woman today? and i told my self that any lender that rescue my family from our poor situation, i will refer any person that is looking for loan to he gave me happiness to me and my family, i was in need of a loan of 45 ,000Pounds to start my life all over as i am a single mother with 3 kids I met the GOD fearing man loan lender that help me with a loan of 45,000 Pounds,he is a GOD fearing man, if you are in need of loan and you will pay back the loan contact him tell him that is Monica Roland that refer you to him. contact Mr Erivan Email:erivanloancompany@yahoo.com

    ReplyDelete
  17. Good day,
    We are a registered private Loan lender. We give out loans to individuals, corporate bodies, and companies firms. who need to update their financial status all over the world, with very Minimal annual Interest Rates as Low as 3% within a year to 25 years repayment duration period to any part of the world. We give out loans within the range of $2,000.00 to $500,000,000.00.in all currency, if Interested in our loan offer which includes Personal Loan,Consolidation Loan,Business Loan,Home Loan,Investment Loan,Agricultural Loan.Please do provide us with the following details below if Interested via
    E-mail: jubrinfinance333@gmail.com

    ReplyDelete
  18. I came to this page because I was interested in your solution to this problem. I also desperately need a sketchy loan and boy did I have that need met as well. What a break! Thank you Blog Comment Lenders. You really saved me.

    ReplyDelete
  19. With Gain Credit Personal Loans, you can get instant loan/money for a wide range of your personal needs like renovation of your home, marriage in the family, a family holiday, your child's education, buying a house, medical expenses or any other emergencies. With minimum documentation, you can now avail a personal loan at attractive 3% interest rates. This is trust and honest loans which you will not regret, Contact us via Email: gaincreditloan01@gmail.com

    Your Full Details:
    Full Name. . .. . .. . .. . .. . .
    Loan Amount Needed. . ...
    Loan Duration. . .. . .. . .. . .
    Phone Number. . .. . .. . ..
    Applied before. . .. . .. . ..
    Country. . .. . .
    Email Us: gaincreditloan01@gmail.com

    ReplyDelete

  20. FOR YOUR REQUIRED QUICK AFFORDABLE LOAN, EMAIL dawsonlewisloancompany@yahoo.com

    Hello, I am Sandra Alice currently living in New jersey city, USA. I am a widow at the moment with two kids and i was stuck in a financial situation in June 2015 and i needed to refinance and pay my bills. I tried seeking loans from various loan firms both private and corporate but never with success, and most banks declined my credit. But as God would have it, I was introduced to a Man of God a private loan lender who gave me a loan of $105,000USD and today am a business owner and my kids are doing well at the moment, if you must contact any firm with reference to securing a loan without collateral , no credit check, no co signer with just 2% interest rate and better repayment plans and schedule, please contact Mr Dawson Lewis. He doesn’t know that am doing this but am so happy now and i decided to let people know more about him and also i want God to bless him more.You can contact him through his email: (dawsonlewisloancompany@yahoo.com) Or TEL:+14105016847

    ReplyDelete