#ExpMath2018, C1.txt Help:=proc(): print(` DiriF(f,s,n), DumbDiv(n), YukunDiv(n) , Conv(f,g,n) `): end: with(numtheory): #DiriF(f,s,N): inputs a number-theoretical function f and a symbol s and a positive integer N #outputs the partial sum up to N of the Dirichlet series of f(n) DiriF:=proc(f,s,N) local n: add(f(n)/n^s,n=1..N): end: #DumbDiv(n): a home-made version of divisors(n) (set of divisors of the pos. integer n) DumbDiv:=proc(n) local S, i: S:={}: for i from 1 to n do if type(n/i,integer) then S:=S union {i}: fi: od: S: end: #YukunDiv(n): a home-made version of divisors(n) (set of divisors of the pos. integer n) YukunDiv:=proc(n) local S, i: S:={}: for i from 1 to trunc(sqrt(n)) do if type(n/i,integer) then S:=S union {i,n/i}: fi: od: S: end: #Conv(f,g,n) Conv:=proc(f,g,n) local S,d: S:=divisors(n): add(f(d)*g(n/d), d in S): end: