# The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. # # Find the sum of all the primes below two million. class NthPrime def initialize @t=[] end def is_prime(n) @t.each do |x| return false if n % x == 0 end return true end def genPrimeUpTo(x) i=2 while i