
http://www.gully.org/~mackys/findprime.c.txt
http://www.reddit.com/r/coding/comments/a3659/a_coding_challenge_given_an_integer_n_find_the/c0fmqtf
This was mostly interesting to me from a mathematical perspective. I was surprised and gratified to find out that there was such a simple and easy upper bound for pi(x). Also, the 6k+1/6k+5 optimization.
When I first read this problem, my intuition told me that there was a prime between N and 2N. Couldn't prove it if my life depended on it, but somehow I just knew... and lo and behold: http://en.wikipedia.org/wiki/Bertrand%27s_postulate !