%I #18 Nov 24 2023 13:37:53
%S 0,0,1,0,1,2,1,0,2,2,1,2,1,2,2,0,1,4,1,2,2,2,1,2,2,2,3,2,1,4,1,0,2,2,
%T 2,4,1,2,2,2,1,4,1,2,3,2,1,2,2,4,2,2,1,6,2,2,2,2,1,4,1,2,3,0,2,4,1,2,
%U 2,4,1,4,1,2,3,2,2,4,1,2,4,2,1,4,2,2,2,2,1,6,2,2,2,2,2,2,1,4,3,4,1,4,1,2,3
%N Number of divisors of n that are either an odd prime power > 1 or twice such a number.
%H Antti Karttunen, <a href="/A366371/b366371.txt">Table of n, a(n) for n = 1..16384</a>
%F a(n) = Sum_{d|n} (1-A354108(d)).
%F For odd n, a(n) = A001222(n), for even n, a(n) = 2*A001222(A000265(n)).
%o (PARI)
%o A354108(n) = ((n && !bitand(n,n-1)) || !isprimepower(n/(2-(n%2))));
%o A366371(n) = sumdiv(n,d,!A354108(d));
%o (Python)
%o from sympy import factorint
%o def A366371(n): return sum(factorint(n).values()) if n&1 else sum(factorint(n>>(~n&n-1).bit_length()).values())<<1 # _Chai Wah Wu_, Nov 24 2023
%Y Inverse Möbius transform of the characteristic function (1-A354108) of the complement of A354109.
%Y Cf. A000265, A001222, A067019 (positions of odd terms), A353558 (parity of terms).
%K nonn
%O 1,6
%A _Antti Karttunen_, Nov 23 2023
|