login
Dirichlet inverse of the sum of n/k over all prime powers k which divide n (including 1).
4

%I #13 Nov 26 2023 11:01:47

%S 1,-2,-2,0,-2,2,-2,0,-1,0,-2,2,-2,-2,-1,0,-2,2,-2,4,-3,-6,-2,2,-3,-8,

%T -2,6,-2,12,-2,0,-7,-12,-5,4,-2,-14,-9,4,-2,18,-2,10,2,-18,-2,2,-5,-2,

%U -13,12,-2,6,-9,6,-15,-24,-2,6,-2,-26,2,0,-11,30,-2,16,-19,16,-2,0,-2,-32,-4,18,-11,36,-2,4,-4,-36

%N Dirichlet inverse of the sum of n/k over all prime powers k which divide n (including 1).

%C Dirichlet inverse of sequence b(n) = 1+A095112(n).

%H Antti Karttunen, <a href="/A366265/b366265.txt">Table of n, a(n) for n = 1..16384</a>

%F a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} (1+A095112(n/d)) * a(d).

%t A095112[n_] := n/Flatten[#[[1]]^Range[#[[2]]]& /@ FactorInteger[n]] // Total;

%t a[n_] := a[n] = If[n == 1, 1, -Sum[(1 + A095112[n/d]) a[d], {d, Most@ Divisors[n]}]];

%t Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Nov 26 2023 *)

%o (PARI)

%o A095112(n) = sumdiv(n,d,(1==omega(d))*(n/d));

%o memoA366265 = Map();

%o A366265(n) = if(1==n,1,my(v); if(mapisdefined(memoA366265,n,&v), v, v = -sumdiv(n,d,if(d<n,(1+A095112(n/d))*A366265(d),0)); mapput(memoA366265,n,v); (v)));

%Y Cf. A095112, A359595 (parity of terms), A359596 (positions of odd terms).

%Y Agrees paritywise with A358777 and A359589.

%K sign

%O 1,2

%A _Antti Karttunen_, Nov 22 2023