This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A345055 #15 Jul 05 2021 02:08:51 %S A345055 1,-3,-2,2,-4,9,-6,0,-4,20,-10,-16,-12,29,11,0,-16,16,-18,-43,18,49, %T A345055 -22,18,-8,60,-2,-43,-28,-89,-30,0,29,80,34,1,-36,89,36,71,-40,-136, %U A345055 -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 A345055 Dirichlet inverse of A011772. %H A345055 Antti Karttunen, <a href="/A345055/b345055.txt">Table of n, a(n) for n = 1..16384</a> %F A345055 a(2^i) = 0 for i >= 3. See A345053. - _Chai Wah Wu_, Jul 05 2021 %o A345055 (PARI) %o A345055 up_to = 16384; %o A345055 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 A345055 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 A345055 v345055 = DirInverseCorrect(vector(up_to,n,A011772(n))); %o A345055 A345055(n) = v345055[n]; %o A345055 (Python 3.8+) %o A345055 from itertools import combinations %o A345055 from math import prod %o A345055 from sympy import factorint, divisors %o A345055 from sympy.ntheory.modular import crt %o A345055 def A011772(n): %o A345055 plist = [p**q for p, q in factorint(2*n).items()] %o A345055 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 A345055 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 A345055 Cf. A011772, A345053 (positions of zeros), A345065. %Y A345055 Cf. also A344767. %K A345055 sign %O A345055 1,2 %A A345055 _Antti Karttunen_, Jun 20 2021