Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,20 @@
func fortunate(n) {
var P = n.pn_primorial
2..Inf -> first {|m| P+m -> is_prob_prime }
}
var limit = 50
var uniq = Set()
var all = []
for (var n = 1; uniq.len < 2*limit; ++n) {
var m = fortunate(n)
all << m
uniq << m
}
say "Fortunate numbers for n = 1..#{limit}:"
say all.first(limit)
say "\n#{limit} Fortunate numbers, sorted with duplicates removed:"
say uniq.sort.first(limit)