Created
October 10, 2009 14:29
-
-
Save bbuckley/206861 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6^(th) prime is 13. | |
# | |
# What is the 10001^(st) prime number? | |
require 'mathn' | |
puts Prime.instance.each.tap{ |x| 10000.times{ x.next} }.next #104743 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment