-
-
Save ShikChen/21dc3e2301bdd73db591cc25576d7f02 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
require 'openssl' | |
n = 100000 | |
m = (n ** 0.5).ceil | |
p = 100000.downto(0).lazy.select{|i| i.to_bn.prime?}.first(m) | |
puts n | |
puts p.product(p).take(n).map{|x, y| x * y} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment