%I #15 Jul 05 2021 02:08:51
%S 1,-3,-2,2,-4,9,-6,0,-4,20,-10,-16,-12,29,11,0,-16,16,-18,-43,18,49,
%T -22,18,-8,60,-2,-43,-28,-89,-30,0,29,80,34,1,-36,89,36,71,-40,-136,
%U -42,-96,27,109,-46,-18,-12,8,47,-123,-52,-19,70,-25,54,140,-58,326,-60,149,21,0,71,-201,-66,-128,65,-264,-70,-140,-72,180,16
%N Dirichlet inverse of A011772.
%H Antti Karttunen, <a href="/A345055/b345055.txt">Table of n, a(n) for n = 1..16384</a>
%F a(2^i) = 0 for i >= 3. See A345053. - _Chai Wah Wu_, Jul 05 2021
%o (PARI)
%o up_to = 16384;
%o 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 (correctly!)
%o A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
%o v345055 = DirInverseCorrect(vector(up_to,n,A011772(n)));
%o A345055(n) = v345055[n];
%o (Python 3.8+)
%o from itertools import combinations
%o from math import prod
%o from sympy import factorint, divisors
%o from sympy.ntheory.modular import crt
%o def A011772(n):
%o plist = [p**q for p, q in factorint(2*n).items()]
%o return 2*n-1 if len(plist) == 1 else min(min(crt([m,2*n//m],[0,-1])[0],crt([2*n//m,m],[0,-1])[0]) for m in (prod(d) for l in range(1,len(plist)//2+1) for d in combinations(plist,l)))
%o def A345055(n): return 1 if n == 1 else -sum(A011772(n//d)*A345055(d) for d in divisors(n, generator=True) if d < n) # _Chai Wah Wu_, Jun 20 2021
%Y Cf. A011772, A345053 (positions of zeros), A345065.
%Y Cf. also A344767.
%K sign
%O 1,2
%A _Antti Karttunen_, Jun 20 2021