Interview Question: Primal Instinct Again

Sample Question #72 (mathematical brainteaser)

(I was asked this at a Goldman Sachs interview a few years ago. Luckily I had already known the answer. Smile )

Can the average of two consecutive prime numbers ever be a prime? If so, provide an example.

Advertisements
This entry was posted in Sample Qs. Bookmark the permalink.

One Response to Interview Question: Primal Instinct Again

  1. Brett says:

    ANSWER
     
    Let the two consecutive prime numbers be a and b, where a < b. If c is their average, we know a < c < b, because both a>0 and b>0. Now, if c were also a prime, what would be wrong with the premise of the question? 

Leave a Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s