%I #37 Dec 30 2022 03:56:13
%S 1,1,2,2,2,2,2,3,3,2,2,4,2,2,4,4,2,3,2,4,4,2,2,6,3,2,4,4,2,4,2,5,4,2,
%T 4,6,2,2,4,6,2,4,2,4,6,2,2,8,3,3,4,4,2,4,4,6,4,2,2,8,2,2,6,6,4,4,2,4,
%U 4,4,2,9,2,2,6,4,4,4,2,8,5,2,2,8,4,2,4,6,2,6,4,4,4,2,4,10,2,3,6,6,2,4,2,6,8
%N Number of divisors d of n that are not of the form 4k+2.
%C Inverse Möbius transform of A152822.
%H Antti Karttunen, <a href="/A320111/b320111.txt">Table of n, a(n) for n = 1..20160</a>
%H Antti Karttunen, <a href="/A320111/a320111.txt">Data supplement: n, a(n) computed for n = 1..65537</a>
%H Matjaž Konvalinka and Vasu Tewari, <a href="https://arxiv.org/abs/2003.04134">Some natural extensions of the parking space</a>, arXiv:2003.04134 [math.CO], 2020.
%F a(n) = Sum_{d|n, d == 0, 1 or 3 mod 4} 1.
%F Multiplicative with a(2^e) = e, a(p^e) = (e+1) for odd primes p.
%F a(2n) = A000005(n), a(2n+1) = A000005(2n+1).
%F a(n) = A000005(A252463(n)).
%F a(1) = a(2) = 1; for n > 2, a(n) = A001511(A252463(n)) * a(A000265(A252463(n))).
%F From _Amiram Eldar_, Dec 30 2022: (Start)
%F Dirichlet g.f.: zeta(s)^2*(1 - 1/2^s + 1/4^s).
%F Sum_{k=1..n} a(k) ~ (3/4)*n*(log(n) + 2*gamma - 1), where gamma is Euler's constant (A001620). (End)
%t Array[DivisorSum[#, 1 &, Mod[#, 4] != 2 &] &, 105] (* _Michael De Vlieger_, Jun 16 2020 *)
%t f[2, e_] := e; f[p_, e_] := e + 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Dec 30 2022 *)
%o (PARI) A320111(n) = sumdiv(n,d,(2!=(d%4)));
%o (PARI) A320111(n) = {my(f); f = factor(n); for(i=1, #f~, if(f[i, 1]>2, f[i, 2]++)); factorback(f[,2])};
%o (PARI)
%o A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
%o A252463(n) = if(!(n%2),n/2,A064989(n));
%o A320111(n) = numdiv(A252463(n));
%o (PARI)
%o \\ A252463 given above
%o A001511(n) = 1+valuation(n,2);
%o A000265(n) = (n>>valuation(n,2));
%o A320111(n) = if(n<=2, 1, my(p=A252463(n)); A001511(p)*A320111(A000265(p)));
%o (Python)
%o from sympy import divisor_count
%o def A320111(n): return divisor_count(n if n&1 else n>>1) # _Chai Wah Wu_, Jul 13 2022
%Y Cf. A000005, A001620, A152822, A252463.
%Y Cf. also A320107 and A319699, A319700, A319703, A319989.
%K nonn,mult
%O 1,3
%A _Antti Karttunen_, Nov 22 2018