-
Notifications
You must be signed in to change notification settings - Fork 0
/
prog.sf
34 lines (23 loc) · 915 Bytes
/
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
#!/usr/bin/ruby
# a(n) = Number of distinct prime factors of sigma(sigma_n(n)).
# https://oeis.org/A??????
# Number of distinct prime factors of A347718(n).
# See also:
# https://oeis.org/A347718
# First terms of the sequence:
# 0, 2, 2, 2, 3, 5, 4, 5, 6, 6, 5, 8, 5, 7, 10, 5, 4, 11, 9, 12, 10, 9, 12, 13, 10, 10, 12, 16, 12, 18, 17, 12, 15, 16, 16, 14, 13, 11, 17, 20, 11, 21, 15, 17, 20, 17, 23, 19, 14, 26, 22, 27, 21, 25, 25, 21, 25, 14, 16, 29, 13, 15, 24, 22, 24, 25, 23, 25, 29, 28, 18, 33
include("../../../factordb/auto.sf")
#sigma_factors_symbolic(sigma(118, 118)).each { .say }
func a(n) {
#sigma(sigma(n, n))
var f = sigma_factors(sigma(n, n))
#var f = sigma_factors_symbolic(n, n)
f.map { FF_factordb(_) }.flat.uniq.len
}
for n in (Num(ARGV[0] \\ 1) .. 1000) {
#print(a(n), ", ")
say "#{n} #{a(n)}"
}
__END__
# PARI/GP program:
a(n) = omega(sigma(sigma(n, n)));