%I #16 Jul 22 2022 16:45:23
%S 1,-1,-1,1,-1,2,-1,-1,1,2,-1,-3,-1,2,2,1,-1,-3,-1,-3,2,2,-1,4,1,2,-1,
%T -3,-1,-6,-1,-1,2,2,2,6,-1,2,2,4,-1,-6,-1,-3,-3,2,-1,-5,1,-3,2,-3,-1,
%U 4,2,4,2,2,-1,12,-1,2,-3,1,2,-6,-1,-3,2,-6,-1,-10,-1,2,-3,-3,2,-6,-1,-5,1,2,-1,12,2,2,2,4,-1,12,2,-3,2,2,2,6,-1,-3,-3,6,-1,-6,-1,4,-6
%N Dirichlet inverse of A080339, characteristic function of noncomposite numbers.
%C The absolute values of this sequence are given by A008480. Compare also to A355817 and A335452.
%H Antti Karttunen, <a href="/A355939/b355939.txt">Table of n, a(n) for n = 1..100000</a>
%H <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A010051(n/d) * a(d).
%F Dirichlet g.f.: 1/(1 + B(s)), where B(s) is d.g.f. of characteristic function of primes. - _Vaclav Kotesovec_, Jul 22 2022
%t s[n_] := If[CompositeQ[n], 0, 1]; a[1] = 1; a[n_] := a[n] = -DivisorSum[n, s[n/#]*a[#] &, # < n &]; Array[a, 100] (* _Amiram Eldar_, Jul 21 2022 *)
%o (PARI)
%o memoA355939 = Map();
%o A355939(n) = if(1==n,1,my(v); if(mapisdefined(memoA355939,n,&v), v, v = -sumdiv(n,d,if(d<n,isprime(n/d)*A355939(d),0)); mapput(memoA355939,n,v); (v)));
%Y Cf. A008480, A010051, A080339.
%Y Cf. also A346482, A355817, A355827.
%K sign
%O 1,6
%A _Antti Karttunen_, Jul 21 2022
|