OFFSET
1,4
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
MATHEMATICA
s[n_] := n * DivisorSum[n, 1/# &, !CompositeQ[#] &]; f[p_, e_] := e/p; d[1] = 1; d[n_] := n*(1 + Plus @@ f @@@ FactorInteger[n]); dinv[1] = 1; dinv[n_] := dinv[n] = -DivisorSum[n, dinv[#] * d[n/#] &, # < n &]; a[n_] := DivisorSum[n, s[#] * dinv[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 18 2021 *)
PROG
(PARI)
up_to = 20000;
DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(d<n, v[n/d]*u[d], 0)))); (u) }; \\ Compute the Dirichlet inverse of the sequence given in input vector v.
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
A230593(n) = sumdiv(n, d, ((1==d)||isprime(d))*(n/d));
v347084 = DirInverseCorrect(vector(up_to, n, n+A003415(n)));
A347084(n) = v347084[n];
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Nov 17 2021
STATUS
approved