A355826 Dirichlet inverse of A355825, characteristic function of exponentially odious numbers.
1, -1, -1, 0, -1, 1, -1, 1, 0, 1, -1, 0, -1, 1, 1, -2, -1, 0, -1, 0, 1, 1, -1, -1, 0, 1, 1, 0, -1, -1, -1, 2, 1, 1, 1, 0, -1, 1, 1, -1, -1, -1, -1, 0, 0, 1, -1, 2, 0, 0, 1, 0, -1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 0, 0, 1, -1, -1, 0, 1, -1, -1, 0, -1, 1, 0, 0, 1, -1, -1, 2, -2, 1, -1, 0, 1, 1, 1, -1, -1, 0, 1, 0, 1, 1, 1, -2, -1, 0, 0, 0, -1, -1, -1, -1, -1, 1, -1, 0, -1, -1, 1, 2, -1, -1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, -1, -4
Offset: 1
Links
Crossrefs
Programs
-
Mathematica
s[n_] := If[AllTrue[FactorInteger[n][[;; , 2]], OddQ[DigitCount[#, 2, 1]] &], 1, 0]; a[1] = 1; a[n_] := a[n] = -DivisorSum[n, s[n/#]*a[#] &, # < n &]; Array[a, 100] (* Amiram Eldar, Jul 19 2022 *)
-
PARI
A355825(n) = factorback(apply(e->(hammingweight(e)%2),factor(n)[,2])); memoA355826 = Map(); A355826(n) = if(1==n,1,my(v); if(mapisdefined(memoA355826,n,&v), v, v = -sumdiv(n,d,if(d
A355825(n/d)*A355826(d),0)); mapput(memoA355826,n,v); (v)));
Formula
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA355825(n/d) * a(d).
Comments