Skip to content

Instantly share code, notes, and snippets.

@bbuckley
Created October 10, 2009 14:29
Show Gist options
  • Save bbuckley/206861 to your computer and use it in GitHub Desktop.
Save bbuckley/206861 to your computer and use it in GitHub Desktop.
# 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