Skip to content

Instantly share code, notes, and snippets.

@dmalikov
Created November 30, 2011 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmalikov/1410646 to your computer and use it in GitHub Desktop.
Save dmalikov/1410646 to your computer and use it in GitHub Desktop.
Project Euler 123 (0.02 s)
import Data.Numbers.Primes
main = print . fst . head . dropWhile (\x -> snd x < (10^10)) . map (\(n,p) -> (n, (2 * p * n)) ) $ zip [2..] primes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment