/
prog.sf
38 lines (29 loc) · 1.04 KB
/
prog.sf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/ruby
# a(n) is the least positive integer not already in the sequence with the property that the concatenation a(0)a(1)...a(n) forms an integer with n distinct prime factors.
# https://oeis.org/A366896
# Known terms:
# 1, 3, 4, 2, 11, 21, 30, 216, 118, 170, 1092, 8484, 97104, 96720, 493170
# New terms:
# a(15) = 251496
# a(16) = 1380652
# a(17) = 12137510
# Lower-bounds:
# a(18) > 56425348
var arr = [1, 3, 4, 2, 11, 21, 30, 216, 118, 170, 1092, 8484, 97104, 96720, 493170, 251496, 1380652, 12137510]
var n = arr.len
var root = arr.join
for k in (1..1e10) {
say "Testing: #{k}"
if (Num(root + k).is_omega_prime(n)) {
if (!arr.contains(k)) {
die "Found: a(#{n}) = #{k}"
}
}
}
__END__
Found: a(15) = 251496 at x.sf line 11
sidef prog.sf 22.22s user 1.92s system 60% cpu 39.830 total
Found: a(16) = 1380652 at x.sf line 17
sidef prog.sf 129.03s user 7.41s system 78% cpu 2:54.64 total
Found: a(17) = 12137510 at x.sf line 18
sidef prog.sf 1574.01s user 52.04s system 93% cpu 28:53.32 total