login
Sum of A122111 and its Dirichlet inverse.
2

%I #9 Jun 10 2022 11:09:20

%S 2,0,0,4,0,16,0,4,16,32,0,0,0,64,64,9,0,-12,0,0,128,128,0,28,64,256,8,

%T 0,0,-120,0,8,256,512,256,74,0,1024,512,56,0,-240,0,0,-96,2048,0,-4,

%U 256,-84,1024,0,0,120,512,112,2048,4096,0,284,0,8192,-192,20,1024,-480,0,0,4096,-552,0,-64,0,16384,-264,0,1024

%N Sum of A122111 and its Dirichlet inverse.

%H Antti Karttunen, <a href="/A354867/b354867.txt">Table of n, a(n) for n = 1..12000</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(n) = A122111(n) + A354866(n).

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

%o (PARI)

%o A122111(n) = if(1==n,n,my(f=factor(n), es=Vecrev(f[,2]),is=concat(apply(primepi,Vecrev(f[,1])),[0]),pri=0,m=1); for(i=1, #es, pri += es[i]; m *= prime(pri)^(is[i]-is[1+i])); (m));

%o memoA354866 = Map();

%o A354866(n) = if(1==n,1,my(v); if(mapisdefined(memoA354866,n,&v), v, v = -sumdiv(n,d,if(d<n,A122111(n/d)*A354866(d),0)); mapput(memoA354866,n,v); (v)));

%o A354867(n) = (A122111(n)+A354866(n));

%Y Cf. A122111, A354866.

%Y Cf. also A354352.

%K sign

%O 1,1

%A _Antti Karttunen_, Jun 09 2022